From 7c825431b5f9793077d9b0437266a8d3705f53ff Mon Sep 17 00:00:00 2001 From: David Mulcahey Date: Sun, 14 Jul 2024 16:47:43 -0400 Subject: [PATCH] test equality --- tests/test_quirks_v2.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/test_quirks_v2.py b/tests/test_quirks_v2.py index 9ca02fedc..1321970bc 100644 --- a/tests/test_quirks_v2.py +++ b/tests/test_quirks_v2.py @@ -192,7 +192,7 @@ async def test_quirks_v2_multiple_matches_raises(device_mock): """Test that adding multiple quirks v2 entries for the same device raises.""" registry = DeviceRegistry() - ( + entry1 = ( add_to_registry_v2( device_mock.manufacturer, device_mock.model, registry=registry ) @@ -206,7 +206,7 @@ async def test_quirks_v2_multiple_matches_raises(device_mock): .build() ) - ( + entry2 = ( add_to_registry_v2( device_mock.manufacturer, device_mock.model, registry=registry ) @@ -221,6 +221,8 @@ async def test_quirks_v2_multiple_matches_raises(device_mock): .build() ) + assert entry1 != entry2 + with pytest.raises( MultipleQuirksMatchException, match="Multiple matches found for device" ): @@ -235,7 +237,7 @@ async def test_quirks_v2_multiple_matches_not_raises(device_mock): """ registry = DeviceRegistry() - ( + entry1 = ( add_to_registry_v2( device_mock.manufacturer, device_mock.model, registry=registry ) @@ -249,7 +251,7 @@ async def test_quirks_v2_multiple_matches_not_raises(device_mock): .build() ) - ( + entry2 = ( add_to_registry_v2( device_mock.manufacturer, device_mock.model, registry=registry ) @@ -263,6 +265,7 @@ async def test_quirks_v2_multiple_matches_not_raises(device_mock): .build() ) + assert entry1 == entry2 assert isinstance(registry.get_device(device_mock), CustomDeviceV2)