diff options
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 |
