def setUp(self): super(MigrateTestFrom1To2Bids, self).setUp() migrate_data(self.app.app.registry) set_db_schema_version(self.db, 0) auction = self.db.get(self.auction_id) auction['bids'][0]['value']['amount'] = auction['value']['amount'] self.db.save(auction)
def setUp(self): super(MigrateTestFrom1To2WithThreeBids, self).setUp() migrate_data(self.app.app.registry) set_db_schema_version(self.db, 0) auction = self.db.get(self.auction_id) auction['bids'].append(deepcopy(auction['bids'][0])) auction['bids'][-1]['id'] = uuid4().hex self.db.save(auction)
def setUp(self): super(MigrateTestFrom1To2WithTwoBids, self).setUp() migrate_data(self.app.app.registry) set_db_schema_version(self.db, 0)
def test_migrate(self): self.assertEqual(get_db_schema_version(self.db), SCHEMA_VERSION) migrate_data(self.app.app.registry, 1) self.assertEqual(get_db_schema_version(self.db), SCHEMA_VERSION)
def setUp(self): super(MigrateTest, self).setUp() migrate_data(self.app.app.registry)