Skip to content

Commit 545121b

Browse files
committed
Test: fix CodeFactor issues
1 parent 843bb7e commit 545121b

File tree

1 file changed

+29
-30
lines changed

1 file changed

+29
-30
lines changed

tests/test_smile.py

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ async def tinker_thermostat(self, smile, loc_id, good_schemas=None, unhappy=Fals
392392
_LOGGER.info(" - failed unexpectedly")
393393
raise self.UnexpectedError
394394

395-
if good_schemas is not []:
395+
if good_schemas != []:
396396
good_schemas.append("!VeryBogusSchemaNameThatNobodyEverUsesOrShouldUse")
397397
for new_schema in good_schemas:
398398
assert_state = True
@@ -829,35 +829,34 @@ async def test_connect_anna_without_boiler_fw4(self):
829829
# Actual test for directory 'Adam'
830830
# living room floor radiator valve and separate zone thermostat
831831
# an three rooms with conventional radiators
832-
"""
833-
@pytest.mark.asyncio
834-
async def test_connect_adam(self):
835-
testdata = {
836-
"95395fb15c814a1f8bba88363e4a5833": { "temperature": 19.8, 'active_preset': 'home',},
837-
"450d49ef2e8942f78c1242cdd8dfecd0": { "temperature": 20.18, 'battery': 0.77, 'selected_schedule': 'Kira' },
838-
"bc9e18756ad04c3f9f35298cbe537c8e": { "temperature": 20.63, 'thermostat': 20.0 },
839-
}
840-
841-
self.smile_setup = 'adam_living_floor_plus_3_rooms'
842-
server, smile, client = await self.connect_wrapper()
843-
assert smile.smile_type == "thermostat"
844-
assert smile.smile_version[0] == "2.3.35"
845-
assert not smile._smile_legacy
846-
await self.device_test(smile, testdata)
847-
await self.tinker_thermostat(
848-
smile, "95395fb15c814a1f8bba88363e4a5833", good_schemas=["Living room"]
849-
)
850-
await smile.close_connection()
851-
await self.disconnect(server, client)
852-
853-
server, smile, client = await self.connect_wrapper(put_timeout=True)
854-
await self.tinker_thermostat(
855-
smile, "95395fb15c814a1f8bba88363e4a5833", good_schemas=["Living room"],
856-
unhappy=True,
857-
)
858-
await smile.close_connection()
859-
await self.disconnect(server, client)
860-
"""
832+
833+
#@pytest.mark.asyncio
834+
#async def test_connect_adam(self):
835+
# testdata = {
836+
# "95395fb15c814a1f8bba88363e4a5833": { "temperature": 19.8, 'active_preset': 'home',},
837+
# "450d49ef2e8942f78c1242cdd8dfecd0": { "temperature": 20.18, 'battery': 0.77, 'selected_schedule': 'Kira' },
838+
# "bc9e18756ad04c3f9f35298cbe537c8e": { "temperature": 20.63, 'thermostat': 20.0 },
839+
# }
840+
841+
# self.smile_setup = 'adam_living_floor_plus_3_rooms'
842+
# server, smile, client = await self.connect_wrapper()
843+
# assert smile.smile_type == "thermostat"
844+
# assert smile.smile_version[0] == "2.3.35"
845+
# assert not smile._smile_legacy
846+
# await self.device_test(smile, testdata)
847+
# await self.tinker_thermostat(
848+
# smile, "95395fb15c814a1f8bba88363e4a5833", good_schemas=["Living room"]
849+
# )
850+
# await smile.close_connection()
851+
# await self.disconnect(server, client)
852+
853+
# server, smile, client = await self.connect_wrapper(put_timeout=True)
854+
# await self.tinker_thermostat(
855+
# smile, "95395fb15c814a1f8bba88363e4a5833", good_schemas=["Living room"],
856+
# unhappy=True,
857+
# )
858+
# await smile.close_connection()
859+
# await self.disconnect(server, client)
861860

862861
@pytest.mark.asyncio
863862
async def test_connect_adam_plus_anna(self):

0 commit comments

Comments
 (0)