diff options
| author | django-bot <ops@djangoproject.com> | 2022-02-08 12:09:55 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-08 12:15:38 +0100 |
| commit | 6a682b38e75d4c975b4c4493565a59f1bc14397c (patch) | |
| tree | 0bd9cda550bea26238656d9f120d769e8b41bb9e /tests/foreign_object/test_forms.py | |
| parent | e73ce08888e6f34d3f050377cfd2fbb733be94a9 (diff) | |
[4.0.x] Refs #33476 -- Reformatted code with Black.
Backport of 9c19aff7c7561e3a82978a272ecdaad40dda5c00 from main.
Diffstat (limited to 'tests/foreign_object/test_forms.py')
| -rw-r--r-- | tests/foreign_object/test_forms.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/foreign_object/test_forms.py b/tests/foreign_object/test_forms.py index 32a8fc3876..61f8f42295 100644 --- a/tests/foreign_object/test_forms.py +++ b/tests/foreign_object/test_forms.py @@ -12,18 +12,18 @@ class FormsTests(TestCase): class ArticleForm(forms.ModelForm): class Meta: model = Article - fields = '__all__' + fields = "__all__" def test_foreign_object_form(self): # A very crude test checking that the non-concrete fields do not get form fields. form = FormsTests.ArticleForm() - self.assertIn('id_pub_date', form.as_table()) - self.assertNotIn('active_translation', form.as_table()) - form = FormsTests.ArticleForm(data={'pub_date': str(datetime.date.today())}) + self.assertIn("id_pub_date", form.as_table()) + self.assertNotIn("active_translation", form.as_table()) + form = FormsTests.ArticleForm(data={"pub_date": str(datetime.date.today())}) self.assertTrue(form.is_valid()) a = form.save() self.assertEqual(a.pub_date, datetime.date.today()) - form = FormsTests.ArticleForm(instance=a, data={'pub_date': '2013-01-01'}) + form = FormsTests.ArticleForm(instance=a, data={"pub_date": "2013-01-01"}) a2 = form.save() self.assertEqual(a.pk, a2.pk) self.assertEqual(a2.pub_date, datetime.date(2013, 1, 1)) |
