Skip to content

Commit

Permalink
Removed the duplicate of the form template which was solely used for …
Browse files Browse the repository at this point in the history
…testing.
  • Loading branch information
Dunedan committed Apr 18, 2015
1 parent 24284aa commit b9ace82
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 32 deletions.
1 change: 0 additions & 1 deletion lockdown/templates/lockdown/base.html
Expand Up @@ -3,7 +3,6 @@
<head>
<title>{% block title %}{% endblock %}</title>
</head>

<body>
{% block content %}
{% endblock %}
Expand Down
3 changes: 0 additions & 3 deletions lockdown/templates/lockdown/form.html
Expand Up @@ -9,14 +9,11 @@ <h2>Coming soon...</h2>
<p>This is not yet available to the public.</p>

{% if form %}

<form action="" method="post">{% csrf_token %}
{{ form.as_p }}
<p><input type="submit" value="Preview" /></p>
</form>

{% endif %}

</div>
{% endblock %}

21 changes: 0 additions & 21 deletions lockdown/tests/templates/lockdown/form.html

This file was deleted.

9 changes: 2 additions & 7 deletions lockdown/tests/tests.py
Expand Up @@ -306,15 +306,10 @@ def test_using_form(self):
Unauthorized access to a to locked page should show the auth form
"""
url = '/auth/user/locked/view/'

template_dirs = [os.path.join(os.path.dirname(
os.path.realpath(__file__)), 'templates')]
with self.settings(TEMPLATE_DIRS=template_dirs):
response = self.client.get(url)

response = self.client.get(url)
self.assertTemplateUsed(response, 'lockdown/form.html')

form = response.context.get('form')
form = response.context['form']
self.failUnless(isinstance(form, AuthForm))

def add_user(self, username='test', password='pw', **kwargs):
Expand Down

0 comments on commit b9ace82

Please sign in to comment.