aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_auth.py
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2011-12-04 14:59:33 +0100
committerElrond <elrond+mediagoblin.org@samba-tng.org>2011-12-04 14:59:33 +0100
commitea5a5b15a3d552eaefc4cf220ed155af06f7c8f7 (patch)
tree3cb34f81f8fa27cb9402f427f3aa0a9691c1a0dd /mediagoblin/tests/test_auth.py
parentbb20c179c43cc9aec2cb7a3160dc734e58961609 (diff)
parent9754802d4bca036b8fb0b50db948dd2eb8f64bd6 (diff)
downloadmediagoblin-ea5a5b15a3d552eaefc4cf220ed155af06f7c8f7.tar.lz
mediagoblin-ea5a5b15a3d552eaefc4cf220ed155af06f7c8f7.tar.xz
mediagoblin-ea5a5b15a3d552eaefc4cf220ed155af06f7c8f7.zip
Merge branch 'misc/fixture_add_user'
* misc/fixture_add_user: fixture_add_user: Factoring a unit test tool
Diffstat (limited to 'mediagoblin/tests/test_auth.py')
-rw-r--r--mediagoblin/tests/test_auth.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/mediagoblin/tests/test_auth.py b/mediagoblin/tests/test_auth.py
index ee085761..2faf0f25 100644
--- a/mediagoblin/tests/test_auth.py
+++ b/mediagoblin/tests/test_auth.py
@@ -20,7 +20,7 @@ import datetime
from nose.tools import assert_equal
from mediagoblin.auth import lib as auth_lib
-from mediagoblin.tests.tools import setup_fresh_app
+from mediagoblin.tests.tools import setup_fresh_app, fixture_add_user
from mediagoblin import mg_globals
from mediagoblin.tools import template, mail
@@ -332,11 +332,7 @@ def test_authentication_views(test_app):
Test logging in and logging out
"""
# Make a new user
- test_user = mg_globals.database.User()
- test_user['username'] = u'chris'
- test_user['email'] = u'chris@example.com'
- test_user['pw_hash'] = auth_lib.bcrypt_gen_password_hash('toast')
- test_user.save()
+ test_user = fixture_add_user(active_user=False)
# Get login
# ---------