diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-01-18 11:40:40 +0100 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-01-18 11:40:40 +0100 |
commit | 1be247b36e58c8c71a974b65dff7194f28483f12 (patch) | |
tree | 10e55ed4a06ae78f94ec6f71848f8110389c69bf /mediagoblin/tests/test_auth.py | |
parent | 4637d50cfc003d638796a581f1ea8df16da879c0 (diff) | |
download | mediagoblin-1be247b36e58c8c71a974b65dff7194f28483f12.tar.lz mediagoblin-1be247b36e58c8c71a974b65dff7194f28483f12.tar.xz mediagoblin-1be247b36e58c8c71a974b65dff7194f28483f12.zip |
Rename get_test_app to get_app.
nosetests runs everything that even vaguely looks like a
test case... even our get_test_app. And as it is imported
everywhere... it is run everywhere as a test case. Renaming
it saves us about 10+ tests and a few seconds of time.
Diffstat (limited to 'mediagoblin/tests/test_auth.py')
-rw-r--r-- | mediagoblin/tests/test_auth.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mediagoblin/tests/test_auth.py b/mediagoblin/tests/test_auth.py index a40c9cbc..103bea6b 100644 --- a/mediagoblin/tests/test_auth.py +++ b/mediagoblin/tests/test_auth.py @@ -22,7 +22,7 @@ from nose.tools import assert_equal from mediagoblin import mg_globals from mediagoblin.auth import lib as auth_lib from mediagoblin.db.models import User -from mediagoblin.tests.tools import get_test_app, fixture_add_user +from mediagoblin.tests.tools import setup_fresh_app, get_app, fixture_add_user from mediagoblin.tools import template, mail @@ -67,11 +67,11 @@ def test_bcrypt_gen_password_hash(): 'notthepassword', hashed_pw, '3><7R45417') -def test_register_views(): +@setup_fresh_app +def test_register_views(test_app): """ Massive test function that all our registration-related views all work. """ - test_app = get_test_app(dump_old_app=False) # Test doing a simple GET on the page # ----------------------------------- @@ -125,7 +125,7 @@ def test_register_views(): u'Invalid email address.'] ## At this point there should be no users in the database ;) - assert not User.query.count() + assert_equal(User.query.count(), 0) # Successful register # ------------------- @@ -315,7 +315,7 @@ def test_authentication_views(): """ Test logging in and logging out """ - test_app = get_test_app(dump_old_app=False) + test_app = get_app(dump_old_app=False) # Make a new user test_user = fixture_add_user(active_user=False) |