aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_auth.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-04-04 19:23:04 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2013-04-04 19:23:04 -0500
commit5c2ece7401723486d76ea0fcd2f99ba4d1002504 (patch)
treea71a2bf9b15bd2805e344362e0bd265d7a124910 /mediagoblin/tests/test_auth.py
parente11c62a0efeb053f71f8ab0793c7399ce8b0758d (diff)
downloadmediagoblin-5c2ece7401723486d76ea0fcd2f99ba4d1002504.tar.lz
mediagoblin-5c2ece7401723486d76ea0fcd2f99ba4d1002504.tar.xz
mediagoblin-5c2ece7401723486d76ea0fcd2f99ba4d1002504.zip
Switch test_app generation over to use py.test fixtures.
By doing this, we can take advantage of py.test's ability to create temporary directories that are then cleaned up later during testing. This helps for sandboxing things. This also involves a ton of changes: - Changing the get_app stuff appropriately, getting rid of the setup_fresh_app decorator - Making said fixture - Switching over a billion tests to use it
Diffstat (limited to 'mediagoblin/tests/test_auth.py')
-rw-r--r--mediagoblin/tests/test_auth.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/mediagoblin/tests/test_auth.py b/mediagoblin/tests/test_auth.py
index a59a319c..f9fe8ed1 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 setup_fresh_app, get_app, fixture_add_user
+from mediagoblin.tests.tools import fixture_add_user
from mediagoblin.tools import template, mail
@@ -65,7 +65,6 @@ def test_bcrypt_gen_password_hash():
'notthepassword', hashed_pw, '3><7R45417')
-@setup_fresh_app
def test_register_views(test_app):
"""
Massive test function that all our registration-related views all work.
@@ -300,11 +299,10 @@ def test_register_views(test_app):
assert 'mediagoblin/root.html' in template.TEMPLATE_TEST_CONTEXT
-def test_authentication_views():
+def test_authentication_views(test_app):
"""
Test logging in and logging out
"""
- test_app = get_app(dump_old_app=False)
# Make a new user
test_user = fixture_add_user(active_user=False)