1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Refs #33476 -- Reformatted code with Black.

This commit is contained in:
django-bot
2022-02-03 20:24:19 +01:00
committed by Mariusz Felisiak
parent f68fa8b45d
commit 9c19aff7c7
1992 changed files with 139577 additions and 96284 deletions

View File

@@ -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"])