@@ -70,7 +70,7 @@ async def test_get_devices_basic(self, client: OverkizClient):
7070 assert len (devices ) == 23
7171
7272 @pytest .mark .parametrize (
73- "fixture_name, event_length" ,
73+ ( "fixture_name" , " event_length") ,
7474 [
7575 ("events.json" , 16 ),
7676 ("local_events.json" , 3 ),
@@ -228,7 +228,7 @@ async def test_fetch_events_casting(self, client: OverkizClient, fixture_name: s
228228 assert isinstance (state .value , dict )
229229
230230 @pytest .mark .parametrize (
231- "fixture_name, device_count, gateway_count" ,
231+ ( "fixture_name" , " device_count" , " gateway_count") ,
232232 [
233233 ("setup_3_gateways.json" , 37 , 3 ),
234234 ("setup_cozytouch.json" , 12 , 1 ),
@@ -365,7 +365,7 @@ async def test_get_diagnostic_data_without_masking(self, client: OverkizClient):
365365 obfuscate .assert_not_called ()
366366
367367 @pytest .mark .parametrize (
368- "fixture_name, exception, status_code" ,
368+ ( "fixture_name" , " exception" , " status_code") ,
369369 [
370370 ("cloud/503-empty.html" , exceptions .ServiceUnavailableError , 503 ),
371371 ("cloud/503-maintenance.html" , exceptions .MaintenanceError , 503 ),
@@ -550,16 +550,16 @@ async def test_check_response_exception_handling(
550550 exception : Exception ,
551551 ):
552552 """Ensure client raises the correct error for various error fixtures/status codes."""
553- with pytest .raises (exception ):
554- if fixture_name :
555- with open (
556- os .path .join (CURRENT_DIR , "fixtures/exceptions/" + fixture_name ),
557- encoding = "utf-8" ,
558- ) as raw_events :
559- resp = MockResponse (raw_events .read (), status_code )
560- else :
561- resp = MockResponse (None , status_code )
553+ if fixture_name :
554+ with open (
555+ os .path .join (CURRENT_DIR , "fixtures/exceptions/" + fixture_name ),
556+ encoding = "utf-8" ,
557+ ) as raw_events :
558+ resp = MockResponse (raw_events .read (), status_code )
559+ else :
560+ resp = MockResponse (None , status_code )
562561
562+ with pytest .raises (exception ):
563563 await check_response (resp )
564564
565565 @pytest .mark .asyncio
@@ -651,7 +651,7 @@ async def test_execute_action_group_omits_none_fields(self, client: OverkizClien
651651 assert cmd ["name" ] == "close"
652652
653653 @pytest .mark .parametrize (
654- "fixture_name, option_name, instance" ,
654+ ( "fixture_name" , " option_name" , " instance") ,
655655 [
656656 (
657657 "setup-options-developerMode.json" ,
@@ -685,7 +685,7 @@ async def test_get_setup_option(
685685 assert isinstance (option , instance )
686686
687687 @pytest .mark .parametrize (
688- "fixture_name, scenario_count" ,
688+ ( "fixture_name" , " scenario_count") ,
689689 [
690690 ("action-group-cozytouch.json" , 9 ),
691691 ("action-group-tahoma-box-v1.json" , 17 ),
0 commit comments