From: Christopher Allan Webber Date: Thu, 10 Jul 2014 15:05:23 +0000 (-0500) Subject: Wrapping things to not exceed column 80 in test_ldap X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a4337755363b49dc891fd8a4e438eb108809b9e4;p=mediagoblin.git Wrapping things to not exceed column 80 in test_ldap --- diff --git a/mediagoblin/tests/test_ldap.py b/mediagoblin/tests/test_ldap.py index 48efb4b6..7e20d059 100644 --- a/mediagoblin/tests/test_ldap.py +++ b/mediagoblin/tests/test_ldap.py @@ -61,7 +61,8 @@ def test_ldap_plugin(ldap_plugin_app): assert form.username.errors == [u'This field is required.'] assert form.password.errors == [u'This field is required.'] - @mock.patch('mediagoblin.plugins.ldap.tools.LDAP.login', mock.Mock(return_value=return_value())) + @mock.patch('mediagoblin.plugins.ldap.tools.LDAP.login', + mock.Mock(return_value=return_value())) def _test_authentication(): template.clear_test_template_context() res = ldap_plugin_app.post( @@ -69,7 +70,8 @@ def test_ldap_plugin(ldap_plugin_app): {'username': u'chris', 'password': u'toast'}) - context = template.TEMPLATE_TEST_CONTEXT['mediagoblin/auth/register.html'] + context = template.TEMPLATE_TEST_CONTEXT[ + 'mediagoblin/auth/register.html'] register_form = context['register_form'] assert register_form.username.data == u'chris' @@ -83,7 +85,8 @@ def test_ldap_plugin(ldap_plugin_app): res.follow() assert urlparse.urlsplit(res.location)[2] == '/u/chris/' - assert 'mediagoblin/user_pages/user_nonactive.html' in template.TEMPLATE_TEST_CONTEXT + assert 'mediagoblin/user_pages/user_nonactive.html' in \ + template.TEMPLATE_TEST_CONTEXT # Try to register with same email and username template.clear_test_template_context() @@ -92,11 +95,14 @@ def test_ldap_plugin(ldap_plugin_app): {'username': u'chris', 'email': u'chris@example.com'}) - context = template.TEMPLATE_TEST_CONTEXT['mediagoblin/auth/register.html'] + context = template.TEMPLATE_TEST_CONTEXT[ + 'mediagoblin/auth/register.html'] register_form = context['register_form'] - assert register_form.email.errors == [u'Sorry, a user with that email address already exists.'] - assert register_form.username.errors == [u'Sorry, a user with that name already exists.'] + assert register_form.email.errors == [ + u'Sorry, a user with that email address already exists.'] + assert register_form.username.errors == [ + u'Sorry, a user with that name already exists.'] # Log out ldap_plugin_app.get('/auth/logout/')