aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_auth.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-06-06 07:45:18 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-06-06 07:45:18 -0500
commit3aa4c668b9bfe53ed58d4ae21ed91210df7ad9ff (patch)
treeb0407aaae7738fee561e4d3ce3408aff210ba29b /mediagoblin/tests/test_auth.py
parent66471f0ee4740daeac2b8a42b88dadec630b8d67 (diff)
downloadmediagoblin-3aa4c668b9bfe53ed58d4ae21ed91210df7ad9ff.tar.lz
mediagoblin-3aa4c668b9bfe53ed58d4ae21ed91210df7ad9ff.tar.xz
mediagoblin-3aa4c668b9bfe53ed58d4ae21ed91210df7ad9ff.zip
A setup_fresh_app decorator which should make writing tests a bit easier.
Setting test_register_views() to use it also.
Diffstat (limited to 'mediagoblin/tests/test_auth.py')
-rw-r--r--mediagoblin/tests/test_auth.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/mediagoblin/tests/test_auth.py b/mediagoblin/tests/test_auth.py
index cf6d48f5..cdfeccab 100644
--- a/mediagoblin/tests/test_auth.py
+++ b/mediagoblin/tests/test_auth.py
@@ -19,7 +19,7 @@ import urlparse
from nose.tools import assert_equal
from mediagoblin.auth import lib as auth_lib
-from mediagoblin.tests.tools import get_test_app
+from mediagoblin.tests.tools import setup_fresh_app
from mediagoblin import globals as mgoblin_globals
from mediagoblin import util
@@ -65,13 +65,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.
"""
- util.clear_test_template_context()
- test_app = get_test_app()
-
# Test doing a simple GET on the page
# -----------------------------------