diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-21 14:14:40 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-21 14:14:40 -0700 |
commit | e4deacd9c898b6a627d892ef09d3d6efeb88ac52 (patch) | |
tree | 9fe1b5343d250ae44b874e21f8bf019935cb388c /mediagoblin/tests/test_auth.py | |
parent | 54ef2c408bdae8a7b827ce648567ae94573a99e3 (diff) | |
download | mediagoblin-e4deacd9c898b6a627d892ef09d3d6efeb88ac52.tar.lz mediagoblin-e4deacd9c898b6a627d892ef09d3d6efeb88ac52.tar.xz mediagoblin-e4deacd9c898b6a627d892ef09d3d6efeb88ac52.zip |
changes after cwebb's review
Diffstat (limited to 'mediagoblin/tests/test_auth.py')
-rw-r--r-- | mediagoblin/tests/test_auth.py | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/mediagoblin/tests/test_auth.py b/mediagoblin/tests/test_auth.py index 83e71580..9f70c5ff 100644 --- a/mediagoblin/tests/test_auth.py +++ b/mediagoblin/tests/test_auth.py @@ -22,7 +22,6 @@ from mediagoblin import mg_globals from mediagoblin.db.models import User from mediagoblin.tests.tools import get_app, fixture_add_user from mediagoblin.tools import template, mail -from mediagoblin.auth.tools import AuthError from mediagoblin.auth import tools as auth_tools @@ -273,7 +272,6 @@ def test_authentication_views(test_app): context = template.TEMPLATE_TEST_CONTEXT['mediagoblin/auth/login.html'] form = context['login_form'] assert form.username.errors == [u'This field is required.'] - assert form.password.errors == [u'This field is required.'] # Failed login - blank user # ------------------------- @@ -291,9 +289,7 @@ def test_authentication_views(test_app): response = test_app.post( '/auth/login/', { 'username': u'chris'}) - context = template.TEMPLATE_TEST_CONTEXT['mediagoblin/auth/login.html'] - form = context['login_form'] - assert form.password.errors == [u'This field is required.'] + assert 'mediagoblin/auth/login.html' in template.TEMPLATE_TEST_CONTEXT # Failed login - bad user # ----------------------- @@ -359,20 +355,6 @@ def test_authentication_views(test_app): assert urlparse.urlsplit(response.location)[2] == '/u/chris/' -# App with authentication_disabled and no auth plugin enabled -def no_auth_plugin_app(request): - return get_app( - request, - mgoblin_config=pkg_resources.resource_filename( - 'mediagoblin.tests.auth_configs', - 'no_auth_plugin_appconfig.ini')) - - -def test_auth_plugin_raises(request): - with pytest.raises(AuthError): - no_auth_plugin_app(request) - - @pytest.fixture() def authentication_disabled_app(request): return get_app( |