mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #33476 -- Reformatted code with Black.
This commit is contained in:
committed by
Mariusz Felisiak
parent
f68fa8b45d
commit
9c19aff7c7
@@ -8,7 +8,7 @@ from .models import UUIDPK
|
||||
class UUIDPKForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = UUIDPK
|
||||
fields = '__all__'
|
||||
fields = "__all__"
|
||||
|
||||
|
||||
class ModelFormBaseTest(TestCase):
|
||||
@@ -20,7 +20,7 @@ class ModelFormBaseTest(TestCase):
|
||||
form.save()
|
||||
|
||||
def test_update_save_error(self):
|
||||
obj = UUIDPK.objects.create(name='foo')
|
||||
obj = UUIDPK.objects.create(name="foo")
|
||||
form = UUIDPKForm({}, instance=obj)
|
||||
self.assertFalse(form.is_valid())
|
||||
msg = "The UUIDPK could not be changed because the data didn't validate."
|
||||
@@ -29,5 +29,7 @@ class ModelFormBaseTest(TestCase):
|
||||
|
||||
def test_model_multiple_choice_field_uuid_pk(self):
|
||||
f = forms.ModelMultipleChoiceField(UUIDPK.objects.all())
|
||||
with self.assertRaisesMessage(ValidationError, '“invalid_uuid” is not a valid UUID.'):
|
||||
f.clean(['invalid_uuid'])
|
||||
with self.assertRaisesMessage(
|
||||
ValidationError, "“invalid_uuid” is not a valid UUID."
|
||||
):
|
||||
f.clean(["invalid_uuid"])
|
||||
|
||||
Reference in New Issue
Block a user