mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Refs #27953 -- Removed hardcoded uses of Model.__str__() in tests.
This commit is contained in:
parent
0877989c94
commit
7c9cb1ed37
6 changed files with 31 additions and 28 deletions
|
@ -21,9 +21,9 @@ class TestFloatField(TestCase):
|
|||
instance.size = instance
|
||||
msg = (
|
||||
'Tried to update field model_fields.FloatModel.size with a model '
|
||||
'instance, <FloatModel: FloatModel object>. Use a value '
|
||||
'instance, %r. Use a value '
|
||||
'compatible with FloatField.'
|
||||
)
|
||||
) % instance
|
||||
with transaction.atomic():
|
||||
with self.assertRaisesMessage(TypeError, msg):
|
||||
instance.save()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue