diff options
author | django-bot <ops@djangoproject.com> | 2022-02-03 20:24:19 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-07 20:37:05 +0100 |
commit | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 (patch) | |
tree | f0506b668a013d0063e5fba3dbf4863b466713ba /tests/mutually_referential | |
parent | f68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff) | |
download | django-9c19aff7c7561e3a82978a272ecdaad40dda5c00.tar.gz |
Refs #33476 -- Reformatted code with Black.
Diffstat (limited to 'tests/mutually_referential')
-rw-r--r-- | tests/mutually_referential/models.py | 4 | ||||
-rw-r--r-- | tests/mutually_referential/tests.py | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/tests/mutually_referential/models.py b/tests/mutually_referential/models.py index cc1dacc118..d82bfb4518 100644 --- a/tests/mutually_referential/models.py +++ b/tests/mutually_referential/models.py @@ -11,7 +11,9 @@ class Parent(models.Model): name = models.CharField(max_length=100) # Use a simple string for forward declarations. - bestchild = models.ForeignKey("Child", models.SET_NULL, null=True, related_name="favored_by") + bestchild = models.ForeignKey( + "Child", models.SET_NULL, null=True, related_name="favored_by" + ) class Child(models.Model): diff --git a/tests/mutually_referential/tests.py b/tests/mutually_referential/tests.py index 8c0ff69565..d54c03ec9a 100644 --- a/tests/mutually_referential/tests.py +++ b/tests/mutually_referential/tests.py @@ -4,15 +4,14 @@ from .models import Parent class MutuallyReferentialTests(TestCase): - def test_mutually_referential(self): # Create a Parent - q = Parent(name='Elizabeth') + q = Parent(name="Elizabeth") q.save() # Create some children - c = q.child_set.create(name='Charles') - q.child_set.create(name='Edward') + c = q.child_set.create(name="Charles") + q.child_set.create(name="Edward") # Set the best child # No assertion require here; if basic assignment and |