diff options
author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-12-21 00:27:59 +0100 |
---|---|---|
committer | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-12-21 00:30:48 +0100 |
commit | 7e55bcb898d37010a5e9bd8a666cd3ddfa63de33 (patch) | |
tree | b15eb178927eeb3e418ed3333e265ce65932e6f2 /mediagoblin/tests/test_auth.py | |
parent | 5c99cd01a70f2d597ac7669e8d944ddf79b05281 (diff) | |
download | mediagoblin-7e55bcb898d37010a5e9bd8a666cd3ddfa63de33.tar.lz mediagoblin-7e55bcb898d37010a5e9bd8a666cd3ddfa63de33.tar.xz mediagoblin-7e55bcb898d37010a5e9bd8a666cd3ddfa63de33.zip |
Fix up tests
empty find() queries would not work anymore with the simplified .find
compatability code, so remove these and use proper sqlalchemy in the
tests.
The storage test failed because my virtualenv environment ran
mediagoblin/local/mediagoblin/tests/test_storage.py and somehow decided
the 2 classes are different objects. Just test against the full class name.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'mediagoblin/tests/test_auth.py')
-rw-r--r-- | mediagoblin/tests/test_auth.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mediagoblin/tests/test_auth.py b/mediagoblin/tests/test_auth.py index 1b84b435..da17554b 100644 --- a/mediagoblin/tests/test_auth.py +++ b/mediagoblin/tests/test_auth.py @@ -19,9 +19,10 @@ import datetime from nose.tools import assert_equal +from mediagoblin import mg_globals from mediagoblin.auth import lib as auth_lib +from mediagoblin.db.sql.models import User from mediagoblin.tests.tools import setup_fresh_app, fixture_add_user -from mediagoblin import mg_globals from mediagoblin.tools import template, mail @@ -124,7 +125,7 @@ def test_register_views(test_app): u'Invalid email address.'] ## At this point there should be no users in the database ;) - assert not mg_globals.database.User.find().count() + assert not User.query.count() # Successful register # ------------------- |