Exemple #1
0
 def test_updater_interfaces(self):
     from dyndnsc.updater.manager import updater_classes, get_updater_class
     for cls in updater_classes():
         self.assertTrue(hasattr(cls, 'configuration_key'))
         self.assertTrue(hasattr(cls, 'update'))
     self.assertTrue(len(updater_classes()) > 0)
     self.assertRaises(KeyError, get_updater_class, 'nonexistant')
 def test_updater_interfaces(self):
     from dyndnsc.updater.manager import updater_classes, get_updater_class
     for cls in updater_classes():
         self.assertTrue(hasattr(cls, 'configuration_key'))
         self.assertTrue(hasattr(cls, 'update'))
     self.assertTrue(len(updater_classes()) > 0)
     self.assertRaises(KeyError, get_updater_class, 'nonexistant')
Exemple #3
0
 def test_updater_interfaces(self):
     from dyndnsc.updater.manager import updater_classes, get_updater_class
     for cls in updater_classes():
         self.assertTrue(hasattr(cls, 'configuration_key'))
         self.assertEqual(cls, get_updater_class(cls.configuration_key()))
         self.assertTrue(hasattr(cls, 'update'))
         self.assertTrue(hasattr(cls, 'register_arguments'))
         self.assertTrue(hasattr(cls, 'help'))
         self.assertEqual(str, type(cls.configuration_key()))
         self.assertTrue(str, type(cls.help()))
     self.assertTrue(len(updater_classes()) > 0)
     self.assertRaises(KeyError, get_updater_class, 'nonexistent')