예제 #1
0
 def test_get_by_id(self):
     ctxt = context.get_admin_context()
     self.mox.StubOutWithMock(db, 'migration_get')
     db.migration_get(ctxt, fake_migration['id']).AndReturn(fake_migration)
     self.mox.ReplayAll()
     mig = migration.Migration.get_by_id(ctxt, fake_migration['id'])
     self._compare(mig, fake_migration)
예제 #2
0
 def test_get_by_id(self):
     ctxt = context.get_admin_context()
     self.mox.StubOutWithMock(db, 'migration_get')
     db.migration_get(ctxt, fake_migration['id']).AndReturn(fake_migration)
     self.mox.ReplayAll()
     mig = migration.Migration.get_by_id(ctxt, fake_migration['id'])
     self._compare(mig, fake_migration)
예제 #3
0
 def get_by_id(cls, context, migration_id):
     db_migration = db.migration_get(context, migration_id)
     return cls._from_db_object(context, cls(), db_migration)
예제 #4
0
파일: migration.py 프로젝트: 375670450/nova
 def get_by_id(cls, context, migration_id):
     db_migration = db.migration_get(context, migration_id)
     return cls._from_db_object(context, cls(), db_migration)