Example #1
0
 def test_PlanObject(self):
     inst = PlanObject(self.params, '.', self.conf)
     #checking if members exist
     self.assertTrue(hasattr(inst, 'template_file'), "Base doesn't contain template_file")
     self.assertTrue(hasattr(inst, 'data_source'), "Base doesn't contain data_source")
     self.assertTrue(hasattr(inst, 'source_type'), "Base doesn't contain source_type")
     self.assertTrue(hasattr(inst, 'sampling'), "Base doesn't contain sampling")
     inst.gather_statistics('device_grid_widget', 'ALL')
     for stat in Configurator.OPTIMIZER_STATISTICS['ALL']:
         self.assertTrue(hasattr(inst, stat), "Base doesn't contain {0}".format(stat))
Example #2
0
 def test_planobject(self):
     inst = PlanObject(self.params, '.', self.conf)
     # checking if members exist
     self.assertTrue(hasattr(inst, 'template_file'),
                     "Base doesn't contain template_file")
     self.assertTrue(hasattr(inst, 'data_source'),
                     "Base doesn't contain data_source")
     self.assertTrue(hasattr(inst, 'source_type'),
                     "Base doesn't contain source_type")
     self.assertTrue(hasattr(inst, 'sampling'),
                     "Base doesn't contain sampling")
     inst.gather_statistics('device_grid_widget', 'ALL')
     for stat in Configurator.OPTIMIZER_STATISTICS['ALL']:
         self.assertTrue(hasattr(inst, stat),
                         "Base doesn't contain {0}".format(stat))