diff options
Diffstat (limited to 'mediagoblin/tests/tools.py')
-rw-r--r-- | mediagoblin/tests/tools.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/mediagoblin/tests/tools.py b/mediagoblin/tests/tools.py index 39b9ac50..82def02c 100644 --- a/mediagoblin/tests/tools.py +++ b/mediagoblin/tests/tools.py @@ -153,28 +153,6 @@ def install_fixtures_simple(db, fixtures): collection.insert(fixture) -def assert_db_meets_expected(db, expected): - """ - Assert a database contains the things we expect it to. - - Objects are found via 'id', so you should make sure your document - has an id. - - Args: - - db: pymongo or mongokit database connection - - expected: the data we expect. Formatted like: - {'collection_name': [ - {'id': 'foo', - 'some_field': 'some_value'},]} - """ - for collection_name, collection_data in six.iteritems(expected): - collection = db[collection_name] - for expected_document in collection_data: - 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 - - def fixture_add_user(username=u'chris', password=u'toast', privileges=[], wants_comment_notification=True): # Reuse existing user or create a new one |