diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-10-23 15:38:38 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-10-23 15:38:38 -0500 |
commit | 839aeaa9441bba1c8764f03448edf49d5c0b59ca (patch) | |
tree | 6f0d4affe53c7a17348655931330707af15663c2 /mediagoblin/tests/test_migrations.py | |
parent | c0e1a7097588076738bdae3191d97f95d0780025 (diff) | |
parent | 733dc2c27595961e17fd9ab205c1f47e8e3918a6 (diff) | |
download | mediagoblin-839aeaa9441bba1c8764f03448edf49d5c0b59ca.tar.lz mediagoblin-839aeaa9441bba1c8764f03448edf49d5c0b59ca.tar.xz mediagoblin-839aeaa9441bba1c8764f03448edf49d5c0b59ca.zip |
Merge remote branch 'remotes/elrond/misc/add_db_field'
Diffstat (limited to 'mediagoblin/tests/test_migrations.py')
-rw-r--r-- | mediagoblin/tests/test_migrations.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mediagoblin/tests/test_migrations.py b/mediagoblin/tests/test_migrations.py index fc2449f7..e7cef0a1 100644 --- a/mediagoblin/tests/test_migrations.py +++ b/mediagoblin/tests/test_migrations.py @@ -23,6 +23,7 @@ from mediagoblin.tests.tools import ( from mediagoblin.db.util import ( RegisterMigration, MigrationManager, ObjectId, MissingCurrentMigration) +from mediagoblin.db.migrations import add_table_field # This one will get filled with local migrations TEST_MIGRATION_REGISTRY = {} @@ -45,10 +46,7 @@ def creature_add_magical_powers(database): magical powers, all existing monsters, setting to an empty list is fine. """ - database['creatures'].update( - {'magical_powers': {'$exists': False}}, - {'$set': {'magical_powers': []}}, - multi=True) + add_table_field(database, 'creatures', 'magical_powers', []) @RegisterMigration(2, TEST_MIGRATION_REGISTRY) |