示例#1
0
 def test_upgrade_with_deleted_flavors(self):
     flavor = db_api.flavor_create(self.context, self.flavor_values)
     db_api.flavor_destroy(self.context, flavor['flavorid'])
     self.migration.upgrade(self.engine)
示例#2
0
 def test_upgrade_dirty_flavors(self):
     db_api.flavor_create(self.context, self.flavor_values)
     self.assertRaises(exception.ValidationError, self.migration.upgrade,
                       self.engine)
示例#3
0
 def test_upgrade_with_deleted_flavors(self):
     flavor = db_api.flavor_create(self.context, self.flavor_values)
     db_api.flavor_destroy(self.context, flavor['flavorid'])
     self.migration.upgrade(self.engine)
示例#4
0
 def _create_main_flavor(self, **updates):
     values = dict(fake_api_flavor, flavorid='mainflavor')
     del values['projects']
     del values['extra_specs']
     values.update(updates)
     return db_api.flavor_create(self.context, values)
示例#5
0
 def test_upgrade_dirty_flavors(self):
     db_api.flavor_create(self.context, self.flavor_values)
     self.assertRaises(exception.ValidationError,
                       self.migration.upgrade, self.engine)