def test_can_find_config_files(self):
     """Test that the config files can be found by the parser."""
     found = False
     for cfg in available_configs():
         found = True
         break
     self.assertTrue(found)
 def test_config_files_have_legacy_link(self):
     """
     Initially, we require a link between the new style config, and the old
     classes so we can transition over to the new config.  When the
     transition is complete, we will drop the requirement, as new devices
     will only be added as config files.
     """
     for cfg in available_configs():
         parsed = TuyaDeviceConfig(cfg)
         self.assertIsNotNone(parsed.legacy_type)
         self.assertIsNotNone(parsed.primary_entity)
Beispiel #3
0
def get_devices():
    for device in available_configs():
        yield TuyaDeviceConfig(device)
 def test_config_files_parse(self):
     for cfg in available_configs():
         parsed = TuyaDeviceConfig(cfg)
         self.assertIsNotNone(parsed.name)