diff options
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( |