Exemple #1
0
 def setUp(self):
     super(RPCAPITestCase, self).setUp()
     self.fake_server = dbutils.get_test_server()
     self.fake_server_obj = objects.Server._from_db_object(
         objects.Server(self.context), self.fake_server)
     self.fake_type = dbutils.get_test_flavor()
     self.fake_type['extra_specs'] = {}
     self.fake_type_obj = objects.Flavor._from_db_object(
         self.context, objects.Flavor(self.context), self.fake_type)
Exemple #2
0
 def _create_flavor(self):
     flavor = db_utils.get_test_flavor()
     flavor['extra'] = {}
     type_obj = objects.Flavor(self.context, **flavor)
     type_obj.create(self.context)
     return type_obj
Exemple #3
0
 def setUp(self):
     super(TestFlavorObject, self).setUp()
     self.ctxt = context.get_admin_context()
     self.fake_flavor = utils.get_test_flavor(context=self.ctxt)
     self.fake_flavor['extra_specs'] = {}