From e908eb62871f0b0aac63afa6601bf222bc2a1a7d Mon Sep 17 00:00:00 2001 From: Matheus Cunha Motta Date: Wed, 26 Feb 2020 15:08:55 -0300 Subject: Fixed #31310 -- Fixed hints in checks for using intermediate model with ambiguous foreign key. symmetrical=False is not required since 87b1ad6e7351464c60e751b483d9dfce3a2d3382. --- tests/invalid_models_tests/test_relative_fields.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/invalid_models_tests/test_relative_fields.py b/tests/invalid_models_tests/test_relative_fields.py index a23e8bf044..7e32cced60 100644 --- a/tests/invalid_models_tests/test_relative_fields.py +++ b/tests/invalid_models_tests/test_relative_fields.py @@ -150,15 +150,14 @@ class RelativeFieldTests(SimpleTestCase): "through_fields keyword argument.", hint=( 'If you want to create a recursive relationship, use ' - 'ForeignKey("self", symmetrical=False, ' - 'through="AmbiguousRelationship").' + 'ManyToManyField("self", through="AmbiguousRelationship").' ), obj=field, id='fields.E334', ), ]) - def test_ambiguous_relationship_model(self): + def test_ambiguous_relationship_model_to(self): class Person(models.Model): pass @@ -182,7 +181,7 @@ class RelativeFieldTests(SimpleTestCase): "keyword argument.", hint=( 'If you want to create a recursive relationship, use ' - 'ForeignKey("self", symmetrical=False, through="AmbiguousRelationship").' + 'ManyToManyField("self", through="AmbiguousRelationship").' ), obj=field, id='fields.E335', -- cgit v1.3