diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-07-11 14:17:50 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-07-11 14:17:50 -0700 |
commit | 44082b12d8a418bacd1ca5b19f7ce2595e07c1ee (patch) | |
tree | 1c252c5ea85df0ab142b0b4ae1a3d5b1ab6230db /mediagoblin/tests/tools.py | |
parent | 3aeca53c85981fa46d61b41a7cf648d90637eb62 (diff) | |
download | mediagoblin-44082b12d8a418bacd1ca5b19f7ce2595e07c1ee.tar.lz mediagoblin-44082b12d8a418bacd1ca5b19f7ce2595e07c1ee.tar.xz mediagoblin-44082b12d8a418bacd1ca5b19f7ce2595e07c1ee.zip |
Patch by Strum. Ticket #451 - Convert all mongokit style .find, .find_one, .one calls over to SQLAlchemy queries
Diffstat (limited to 'mediagoblin/tests/tools.py')
-rw-r--r-- | mediagoblin/tests/tools.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mediagoblin/tests/tools.py b/mediagoblin/tests/tools.py index 2584c62f..98361adc 100644 --- a/mediagoblin/tests/tools.py +++ b/mediagoblin/tests/tools.py @@ -164,7 +164,7 @@ def assert_db_meets_expected(db, expected): for collection_name, collection_data in expected.iteritems(): collection = db[collection_name] for expected_document in collection_data: - document = collection.find_one({'id': expected_document['id']}) + document = collection.query.filter_by(id=expected_document['id']).first() assert document is not None # make sure it exists assert document == expected_document # make sure it matches |