summaryrefslogtreecommitdiff
path: root/tests/model_fields/test_floatfield.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/model_fields/test_floatfield.py')
-rw-r--r--tests/model_fields/test_floatfield.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/model_fields/test_floatfield.py b/tests/model_fields/test_floatfield.py
index 856197cd6e..264b5677e9 100644
--- a/tests/model_fields/test_floatfield.py
+++ b/tests/model_fields/test_floatfield.py
@@ -5,7 +5,6 @@ from .models import FloatModel
class TestFloatField(TestCase):
-
def test_float_validates_object(self):
instance = FloatModel(size=2.5)
# Try setting float field to unsaved object
@@ -20,8 +19,8 @@ class TestFloatField(TestCase):
# Set field to object on saved instance
instance.size = instance
msg = (
- 'Tried to update field model_fields.FloatModel.size with a model '
- 'instance, %r. Use a value compatible with FloatField.'
+ "Tried to update field model_fields.FloatModel.size with a model "
+ "instance, %r. Use a value compatible with FloatField."
) % instance
with transaction.atomic():
with self.assertRaisesMessage(TypeError, msg):
@@ -40,8 +39,8 @@ class TestFloatField(TestCase):
(TypeError, set()),
(TypeError, object()),
(TypeError, complex()),
- (ValueError, 'non-numeric string'),
- (ValueError, b'non-numeric byte-string'),
+ (ValueError, "non-numeric string"),
+ (ValueError, b"non-numeric byte-string"),
]
for exception, value in tests:
with self.subTest(value):