summaryrefslogtreecommitdiff
path: root/tests/model_formsets
diff options
context:
space:
mode:
Diffstat (limited to 'tests/model_formsets')
-rw-r--r--tests/model_formsets/models.py2
-rw-r--r--tests/model_formsets/tests.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/model_formsets/models.py b/tests/model_formsets/models.py
index 7b7337fd52..0bf56189a7 100644
--- a/tests/model_formsets/models.py
+++ b/tests/model_formsets/models.py
@@ -166,7 +166,7 @@ class MexicanRestaurant(Restaurant):
class ClassyMexicanRestaurant(MexicanRestaurant):
- restaurant = models.OneToOneField(MexicanRestaurant, models.CASCADE, parent_link=True, primary_key=True)
+ the_restaurant = models.OneToOneField(MexicanRestaurant, models.CASCADE, parent_link=True, primary_key=True)
tacos_are_yummy = models.BooleanField(default=False)
diff --git a/tests/model_formsets/tests.py b/tests/model_formsets/tests.py
index 7ac1700691..60acc463cc 100644
--- a/tests/model_formsets/tests.py
+++ b/tests/model_formsets/tests.py
@@ -1461,7 +1461,7 @@ class ModelFormsetTest(TestCase):
# a formset for a Model that has a custom primary key that still needs to be
# added to the formset automatically
FormSet = modelformset_factory(ClassyMexicanRestaurant, fields=["tacos_are_yummy"])
- self.assertEqual(sorted(FormSet().forms[0].fields.keys()), ['restaurant', 'tacos_are_yummy'])
+ self.assertEqual(sorted(FormSet().forms[0].fields.keys()), ['tacos_are_yummy', 'the_restaurant'])
def test_model_formset_with_initial_model_instance(self):
# has_changed should compare model instance and primary key