summaryrefslogtreecommitdiff
path: root/django/contrib/formtools/tests
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/formtools/tests')
-rw-r--r--django/contrib/formtools/tests/forms.py3
-rw-r--r--django/contrib/formtools/tests/tests.py2
2 files changed, 5 insertions, 0 deletions
diff --git a/django/contrib/formtools/tests/forms.py b/django/contrib/formtools/tests/forms.py
index 6f3ce4b0bd..354297870a 100644
--- a/django/contrib/formtools/tests/forms.py
+++ b/django/contrib/formtools/tests/forms.py
@@ -1,15 +1,18 @@
from django import forms
+
class TestForm(forms.Form):
field1 = forms.CharField()
field1_ = forms.CharField()
bool1 = forms.BooleanField(required=False)
date1 = forms.DateField(required=False)
+
class HashTestForm(forms.Form):
name = forms.CharField()
bio = forms.CharField()
+
class HashTestBlankForm(forms.Form):
name = forms.CharField(required=False)
bio = forms.CharField(required=False)
diff --git a/django/contrib/formtools/tests/tests.py b/django/contrib/formtools/tests/tests.py
index e15a310629..84b0c7e2d0 100644
--- a/django/contrib/formtools/tests/tests.py
+++ b/django/contrib/formtools/tests/tests.py
@@ -19,6 +19,7 @@ from django.contrib.formtools.tests.forms import (
success_string = "Done was called!"
success_string_encoded = success_string.encode()
+
class TestFormPreview(preview.FormPreview):
def get_context(self, request, form):
context = super(TestFormPreview, self).get_context(request, form)
@@ -31,6 +32,7 @@ class TestFormPreview(preview.FormPreview):
def done(self, request, cleaned_data):
return http.HttpResponse(success_string)
+
@override_settings(
TEMPLATE_DIRS=(
os.path.join(os.path.dirname(upath(__file__)), 'templates'),