Skip to content

Commit

Permalink
Fix string comparison issues with DeviceEntryType
Browse files Browse the repository at this point in the history
  • Loading branch information
agners committed Jan 11, 2022
1 parent 02adda8 commit 58361c6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/components/deconz/test_gateway.py
Expand Up @@ -176,7 +176,7 @@ async def test_gateway_setup(hass, aioclient_mock):
)

assert gateway_entry.configuration_url == f"http://{HOST}:{PORT}"
assert gateway_entry.entry_type is dr.DeviceEntryType.SERVICE
assert gateway_entry.entry_type == dr.DeviceEntryType.SERVICE


async def test_gateway_device_configuration_url_when_addon(hass, aioclient_mock):
Expand Down
2 changes: 1 addition & 1 deletion tests/components/picnic/test_sensor.py
Expand Up @@ -434,7 +434,7 @@ async def test_device_registry_entry(self):
)
assert picnic_service.model == DEFAULT_USER_RESPONSE["user_id"]
assert picnic_service.name == "Picnic: Commonstreet 123a"
assert picnic_service.entry_type is DeviceEntryType.SERVICE
assert picnic_service.entry_type == DeviceEntryType.SERVICE

async def test_auth_token_is_saved_on_update(self):
"""Test that auth-token changes in the session object are reflected by the config entry."""
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/test_device_registry.py
Expand Up @@ -217,7 +217,7 @@ async def test_loading_from_storage(hass, hass_storage):
assert entry.area_id == "12345A"
assert entry.name_by_user == "Test Friendly Name"
assert entry.hw_version == "hw_version"
assert entry.entry_type is device_registry.DeviceEntryType.SERVICE
assert entry.entry_type == device_registry.DeviceEntryType.SERVICE
assert entry.disabled_by == device_registry.DeviceEntryDisabler.USER
assert isinstance(entry.config_entries, set)
assert isinstance(entry.connections, set)
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/test_entity_platform.py
Expand Up @@ -864,7 +864,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
assert device.identifiers == {("hue", "1234")}
assert device.configuration_url == "http://192.168.0.100/config"
assert device.connections == {(dr.CONNECTION_NETWORK_MAC, "abcd")}
assert device.entry_type is dr.DeviceEntryType.SERVICE
assert device.entry_type == dr.DeviceEntryType.SERVICE
assert device.manufacturer == "test-manuf"
assert device.model == "test-model"
assert device.name == "test-name"
Expand Down

0 comments on commit 58361c6

Please sign in to comment.