def test_device_id_should_be_number(self): with open('{}/api_responses/light_bulb.json'.format(os.path.dirname(__file__))) as light_file: response_dict = json.load(light_file) light = response_dict.get('data')[0] wink_light = WinkBulb(light, self.api_interface) device_id = wink_light.device_id() self.assertRegex(device_id, "^[0-9]{4,6}$")
def test_device_id_should_be_number(self): with open('{}/api_responses/light_bulb.json'.format( os.path.dirname(__file__))) as light_file: response_dict = json.load(light_file) light = response_dict.get('data')[0] wink_light = WinkBulb(light, self.api_interface) device_id = wink_light.device_id() self.assertRegex(device_id, "^[0-9]{4,6}$")