Skip to content

Commit

Permalink
Fan tests: update for FanEntityFeature changes
Browse files Browse the repository at this point in the history
Issue #2164
  • Loading branch information
make-all committed Aug 27, 2024
1 parent 1837616 commit 63d7b58
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 13 deletions.
4 changes: 3 additions & 1 deletion tests/devices/test_anko_fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def test_supported_features(self):
self.subject.supported_features,
FanEntityFeature.OSCILLATE
| FanEntityFeature.PRESET_MODE
| FanEntityFeature.SET_SPEED,
| FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF,
)

def test_preset_mode(self):
Expand Down
2 changes: 2 additions & 0 deletions tests/devices/test_arlec_fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def test_supported_features(self):
FanEntityFeature.DIRECTION
| FanEntityFeature.PRESET_MODE
| FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_OFF
| FanEntityFeature.TURN_ON
),
)

Expand Down
2 changes: 2 additions & 0 deletions tests/devices/test_arlec_fan_light.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def test_supported_features(self):
FanEntityFeature.DIRECTION
| FanEntityFeature.PRESET_MODE
| FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF
),
)

Expand Down
2 changes: 2 additions & 0 deletions tests/devices/test_aspen_adv200_fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def test_supported_features(self):
FanEntityFeature.DIRECTION
| FanEntityFeature.PRESET_MODE
| FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_OFF
| FanEntityFeature.TURN_ON
),
)
self.assertEqual(
Expand Down
4 changes: 3 additions & 1 deletion tests/devices/test_blitzwolf_bsh2_humidifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def setUp(self):
def test_supported_features(self):
self.assertEqual(
self.subject.supported_features,
FanEntityFeature.SET_SPEED,
FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_OFF
| FanEntityFeature.TURN_ON,
)

def test_speed(self):
Expand Down
4 changes: 3 additions & 1 deletion tests/devices/test_deta_fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def setUp(self):
def test_supported_features(self):
self.assertEqual(
self.subject.supported_features,
FanEntityFeature.SET_SPEED,
FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF,
)

def test_speed(self):
Expand Down
12 changes: 10 additions & 2 deletions tests/devices/test_eanons_humidifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,16 @@ def setUp(self):
)

def test_supported_features(self):
self.assertEqual(self.subject.supported_features, HumidifierEntityFeature.MODES)
self.assertEqual(self.fan.supported_features, FanEntityFeature.SET_SPEED)
self.assertEqual(
self.subject.supported_features,
HumidifierEntityFeature.MODES,
)
self.assertEqual(
self.fan.supported_features,
FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_OFF
| FanEntityFeature.TURN_ON,
)

def test_current_humidity(self):
self.dps[CURRENTHUMID_DPS] = 75
Expand Down
2 changes: 2 additions & 0 deletions tests/devices/test_goldair_fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def test_supported_features(self):
FanEntityFeature.OSCILLATE
| FanEntityFeature.PRESET_MODE
| FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF
),
)

Expand Down
4 changes: 3 additions & 1 deletion tests/devices/test_himox_h05_purifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ def setUp(self):
def test_supported_features(self):
self.assertEqual(
self.subject.supported_features,
FanEntityFeature.PRESET_MODE,
FanEntityFeature.PRESET_MODE
| FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF,
)

def test_preset_modes(self):
Expand Down
4 changes: 3 additions & 1 deletion tests/devices/test_himox_h06_purifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ def setUp(self):
def test_supported_features(self):
self.assertEqual(
self.subject.supported_features,
FanEntityFeature.SET_SPEED,
FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_OFF
| FanEntityFeature.TURN_ON,
)

def test_speed(self):
Expand Down
4 changes: 3 additions & 1 deletion tests/devices/test_immax_neo_light_vento.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def test_supported_features(self):
self.fan.supported_features,
FanEntityFeature.DIRECTION
| FanEntityFeature.PRESET_MODE
| FanEntityFeature.SET_SPEED,
| FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_OFF
| FanEntityFeature.TURN_ON,
)

def test_preset_modes(self):
Expand Down
2 changes: 2 additions & 0 deletions tests/devices/test_lexy_f501_fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def test_supported_features(self):
FanEntityFeature.OSCILLATE
| FanEntityFeature.PRESET_MODE
| FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_OFF
| FanEntityFeature.TURN_ON
),
)

Expand Down
5 changes: 4 additions & 1 deletion tests/devices/test_poiema_one_purifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ def setUp(self):
def test_supported_features(self):
self.assertEqual(
self.subject.supported_features,
FanEntityFeature.PRESET_MODE | FanEntityFeature.SET_SPEED,
FanEntityFeature.PRESET_MODE
| FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_OFF
| FanEntityFeature.TURN_ON,
)

def test_speed(self):
Expand Down
7 changes: 6 additions & 1 deletion tests/devices/test_renpho_rp_ap001s.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ def setUp(self):
)

def test_supported_features(self):
self.assertEqual(self.subject.supported_features, FanEntityFeature.PRESET_MODE)
self.assertEqual(
self.subject.supported_features,
FanEntityFeature.PRESET_MODE
| FanEntityFeature.TURN_OFF
| FanEntityFeature.TURN_ON,
)

def test_preset_modes(self):
self.assertCountEqual(
Expand Down
2 changes: 2 additions & 0 deletions tests/devices/test_stirling_fs140dc_fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def test_supported_features(self):
FanEntityFeature.OSCILLATE
| FanEntityFeature.PRESET_MODE
| FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_OFF
| FanEntityFeature.TURN_ON
),
)

Expand Down
4 changes: 3 additions & 1 deletion tests/devices/test_tmwf02_fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def setUp(self):
def test_supported_features(self):
self.assertEqual(
self.subject.supported_features,
FanEntityFeature.SET_SPEED,
FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF,
)

def test_speed(self):
Expand Down
4 changes: 3 additions & 1 deletion tests/devices/test_treatlife_ds02f.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ def setUp(self):
def test_supported_features(self):
self.assertEqual(
self.subject.supported_features,
FanEntityFeature.SET_SPEED,
FanEntityFeature.SET_SPEED
| FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF,
)

def test_speed(self):
Expand Down
4 changes: 3 additions & 1 deletion tests/devices/test_vork_vk6067aw_purifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ def setUp(self):
def test_supported_features(self):
self.assertEqual(
self.subject.supported_features,
FanEntityFeature.PRESET_MODE,
FanEntityFeature.PRESET_MODE
| FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF,
)

def test_preset_modes(self):
Expand Down

0 comments on commit 63d7b58

Please sign in to comment.