summaryrefslogtreecommitdiff
path: root/tests/model_forms
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-03-20 10:30:41 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-03-20 10:30:41 -0700
commit0cf158cf9ac6f4d03faf8b72a71bf1d06ad8503e (patch)
tree5bc85b631df8ea71dbdd4a9e9690f9ff481a1f03 /tests/model_forms
parent3ecc25bd587d10f16831d6d1939ec7c758fc90c4 (diff)
Fixed a small collection of flake8 violations that had snuck in
Diffstat (limited to 'tests/model_forms')
-rw-r--r--tests/model_forms/tests.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py
index 3a3ea894d0..468f83686e 100644
--- a/tests/model_forms/tests.py
+++ b/tests/model_forms/tests.py
@@ -1297,7 +1297,7 @@ class ModelFormBasicTests(TestCase):
self.assertEqual(Category.objects.get(id=cat.id).name, 'Third')
def test_runtime_choicefield_populated(self):
- self.maxDiff=None
+ self.maxDiff = None
# Here, we demonstrate that choices for a ForeignKey ChoiceField are determined
# at runtime, based on the data in the database when the form is displayed, not
# the data in the database when the form is instantiated.
@@ -1395,10 +1395,10 @@ class ModelChoiceFieldTests(TestCase):
self.assertEqual(f.clean(str(self.c1.id)).name, "Entertainment")
with self.assertRaises(ValidationError):
f.clean('100')
-
+
# len can be called on choices
self.assertEqual(len(f.choices), 2)
-
+
# queryset can be changed after the field is created.
f.queryset = Category.objects.exclude(name='Third')
self.assertEqual(list(f.choices), [
@@ -1988,6 +1988,7 @@ class FileAndImageFieldTests(TestCase):
self.assertEqual(instance.image.name, 'foo/test4.png')
instance.delete()
+
class ModelOtherFieldTests(TestCase):
def test_big_integer_field(self):
bif = BigIntForm({'biggie': '-9223372036854775808'})