diff --git a/tests/test_alarm.py b/tests/test_alarm.py index 014786b..d1ff47c 100644 --- a/tests/test_alarm.py +++ b/tests/test_alarm.py @@ -32,7 +32,7 @@ def tests_abode_alarm_setup(self, m): def tests_alarm_device_properties(self, m): """Check that the abode device properties are working.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -91,7 +91,7 @@ def tests_alarm_device_properties(self, m): def tests_alarm_device_mode_changes(self, m): """Test that the abode alarm can change/report modes.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) diff --git a/tests/test_automation.py b/tests/test_automation.py index 781d318..d280318 100644 --- a/tests/test_automation.py +++ b/tests/test_automation.py @@ -51,7 +51,7 @@ def tests_automation_init(self, m): def tests_automation_refresh(self, m): """Check the automation Abode class refreshes.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -121,7 +121,7 @@ def tests_automation_refresh(self, m): def tests_multiple_automations(self, m): """Check that multiple automations work and return correctly.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -165,7 +165,7 @@ def tests_multiple_automations(self, m): def tests_automation_class_reuse(self, m): """Check that automations reuse the same classes when refreshed.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -238,7 +238,7 @@ def tests_automation_class_reuse(self, m): def tests_automation_enable(self, m): """Check that automations can change their enable state.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -319,7 +319,7 @@ def tests_automation_enable(self, m): def tests_automation_trigger(self, m): """Check that automations can be triggered.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) diff --git a/tests/test_binary_sensor.py b/tests/test_binary_sensor.py index b9e2171..76d9056 100644 --- a/tests/test_binary_sensor.py +++ b/tests/test_binary_sensor.py @@ -22,7 +22,7 @@ class TestBinarySensors: def tests_binary_sensor_properties(self, m): """Tests that binary sensor device properties work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) diff --git a/tests/test_device.py b/tests/test_device.py index b2ef06e..2d1d235 100644 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -36,7 +36,6 @@ class TestDevice: def tests_device_mapping_type_tag(self): """Check new device without type_tag raises exception.""" - # Set up device device = GLASS.device( status=CONST.STATUS_ONLINE, low_battery=True, @@ -51,7 +50,6 @@ def tests_device_mapping_type_tag(self): def tests_device_auto_naming(self): """Check the generic Abode device creates a name.""" - # Set up device source = GLASS.device( status=CONST.STATUS_ONLINE, low_battery=True, @@ -120,7 +118,7 @@ def tests_device_init(self, m): def tests_generic_device_refresh(self, m): """Check the generic Abode device class init's properly.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -146,7 +144,7 @@ def tests_generic_device_refresh(self, m): def tests_multiple_devices(self, m): """Tests that multiple devices are returned properly.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -185,7 +183,7 @@ def tests_multiple_devices(self, m): def tests_unknown_devices(self, m): """Tests that multiple devices are returned properly.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -205,7 +203,7 @@ def tests_unknown_devices(self, m): def tests_device_category_filter(self, m): """Tests that device category filter returns requested results.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -252,7 +250,7 @@ def tests_device_category_filter(self, m): def tests_no_control_url(self, m): """Check that devices return false without control url's.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -272,7 +270,7 @@ def tests_no_control_url(self, m): def tests_device_status_changes(self, m): """Tests that device status changes work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -349,7 +347,7 @@ def tests_device_status_changes(self, m): def tests_device_level_changes(self, m): """Tests that device level changes work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -419,7 +417,7 @@ def tests_device_level_changes(self, m): def tests_all_devices(self, m): """Tests that all mocked devices are mapped correctly.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) diff --git a/tests/test_dimmer.py b/tests/test_dimmer.py index dc4647e..bb6e229 100644 --- a/tests/test_dimmer.py +++ b/tests/test_dimmer.py @@ -18,7 +18,7 @@ class TestDimmer: def tests_dimmer_device_properties(self, m): """Tests that dimmer light devices properties work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -78,7 +78,7 @@ def tests_dimmer_device_properties(self, m): def tests_dimmer_status_changes(self, m): """Tests that dimmer device changes work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) diff --git a/tests/test_door_lock.py b/tests/test_door_lock.py index e239014..c1c0d9c 100644 --- a/tests/test_door_lock.py +++ b/tests/test_door_lock.py @@ -18,7 +18,7 @@ class TestDoorLock: def tests_lock_device_properties(self, m): """Tests that lock devices properties work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -70,7 +70,7 @@ def tests_lock_device_properties(self, m): def tests_lock_device_mode_changes(self, m): """Tests that lock device changes work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) diff --git a/tests/test_event_controller.py b/tests/test_event_controller.py index b254796..8db78aa 100644 --- a/tests/test_event_controller.py +++ b/tests/test_event_controller.py @@ -22,7 +22,7 @@ class TestEventController: def tests_device_id_registration(self, m): """Tests that we can register for device events with a device id.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -56,7 +56,7 @@ def tests_device_id_registration(self, m): def tests_device_registration(self, m): """Tests that we can register for device events with a device.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -87,7 +87,7 @@ def tests_device_registration(self, m): def tests_device_all_unregistration(self, m): """Tests that we can unregister for all device events.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -121,7 +121,7 @@ def tests_device_all_unregistration(self, m): def tests_invalid_device(self, m): """Tests that invalid devices are not registered.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -161,7 +161,7 @@ def tests_invalid_device(self, m): def tests_invalid_all_device_unregister(self, m): """Tests that invalid devices are not all unregistered.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -240,7 +240,7 @@ def tests_timeline_registration(self): def tests_device_callback(self, m): """Tests that device updates callback correctly.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -357,7 +357,7 @@ def tests_timeline_callback(self): def tests_alarm_callback(self, m): """Tests that alarm device updates callback correctly.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -422,7 +422,7 @@ def _callback(event_json): def tests_multi_device_callback(self, m): """Tests that multiple device updates callback correctly.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -461,7 +461,7 @@ def tests_multi_device_callback(self, m): # Register our devices assert events.add_device_callback([cover, doorcontact], callback) - # Set up device update URL's + # Set up device update URLs cover_url = CONST.DEVICE_URL.format(device_id=COVER.DEVICE_ID) m.get( cover_url, diff --git a/tests/test_hue.py b/tests/test_hue.py index 2e9a985..6967f7d 100644 --- a/tests/test_hue.py +++ b/tests/test_hue.py @@ -18,7 +18,7 @@ class TestHue: def tests_hue_device_properties(self, m): """Tests that hue light devices properties work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -93,7 +93,7 @@ def tests_hue_device_properties(self, m): def tests_hue_status_changes(self, m): """Tests that hue device changes work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -164,7 +164,7 @@ def tests_hue_status_changes(self, m): def tests_hue_color_temp_changes(self, m): """Tests that hue device color temp changes work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -231,7 +231,7 @@ def tests_hue_color_temp_changes(self, m): def tests_hue_color_changes(self, m): """Tests that hue device color changes work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) diff --git a/tests/test_lm.py b/tests/test_lm.py index 3287345..a13ebf7 100644 --- a/tests/test_lm.py +++ b/tests/test_lm.py @@ -14,7 +14,7 @@ class TestLM: def tests_cover_lm_properties(self, m): """Tests that sensor/LM devices properties work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -88,7 +88,7 @@ def tests_cover_lm_properties(self, m): def tests_lm_float_units(self, m): """Tests that sensor/LM devices properties work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -129,7 +129,7 @@ def tests_lm_float_units(self, m): def tests_lm_temp_only(self, m): """Tests that sensor/LM devices properties work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) diff --git a/tests/test_power_switch_meter.py b/tests/test_power_switch_meter.py index d39d028..11f79a8 100644 --- a/tests/test_power_switch_meter.py +++ b/tests/test_power_switch_meter.py @@ -18,7 +18,7 @@ class TestPowerSwitchMeter: def tests_switch_device_properties(self, m): """Tests that switch devices properties work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -70,7 +70,7 @@ def tests_switch_device_properties(self, m): def tests_switch_status_changes(self, m): """Tests that switch device changes work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) diff --git a/tests/test_power_switch_sensor.py b/tests/test_power_switch_sensor.py index a43dd51..2ecfc5f 100644 --- a/tests/test_power_switch_sensor.py +++ b/tests/test_power_switch_sensor.py @@ -18,7 +18,7 @@ class TestPowerSwitchSensor: def tests_switch_device_properties(self, m): """Tests that switch devices properties work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -70,7 +70,7 @@ def tests_switch_device_properties(self, m): def tests_switch_status_changes(self, m): """Tests that switch device changes work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) diff --git a/tests/test_secure_barrier.py b/tests/test_secure_barrier.py index 8b2664e..1ac12a9 100644 --- a/tests/test_secure_barrier.py +++ b/tests/test_secure_barrier.py @@ -15,7 +15,7 @@ class TestSecureBarrier: def tests_cover_device_properties(self, m): """Tests that cover devices properties work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -69,7 +69,7 @@ def tests_cover_device_properties(self, m): def tests_cover_status_changes(self, m): """Tests that cover device changes work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) diff --git a/tests/test_valve.py b/tests/test_valve.py index 6ca8ed6..6ecd363 100644 --- a/tests/test_valve.py +++ b/tests/test_valve.py @@ -18,7 +18,7 @@ class TestValve: def tests_switch_device_properties(self, m): """Tests that switch devices properties work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok()) @@ -71,7 +71,7 @@ def tests_switch_device_properties(self, m): def tests_switch_status_changes(self, m): """Tests that switch device changes work as expected.""" - # Set up URL's + # Set up URLs m.post(CONST.LOGIN_URL, json=LOGIN.post_response_ok()) m.get(CONST.OAUTH_TOKEN_URL, json=OAUTH_CLAIMS.get_response_ok()) m.post(CONST.LOGOUT_URL, json=LOGOUT.post_response_ok())