diff options
author | Matheus Cunha Motta <sqrtomath@gmail.com> | 2020-02-26 15:08:55 -0300 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-02-28 08:38:57 +0100 |
commit | e908eb62871f0b0aac63afa6601bf222bc2a1a7d (patch) | |
tree | 34e86fecffb9be36411ee279eae0d9e3ed9b97ec /tests/invalid_models_tests | |
parent | 308fab924195bdea2fc481e1466c3c3894c03400 (diff) | |
download | django-e908eb62871f0b0aac63afa6601bf222bc2a1a7d.tar.gz |
Fixed #31310 -- Fixed hints in checks for using intermediate model with ambiguous foreign key.
symmetrical=False is not required since
87b1ad6e7351464c60e751b483d9dfce3a2d3382.
Diffstat (limited to 'tests/invalid_models_tests')
-rw-r--r-- | tests/invalid_models_tests/test_relative_fields.py | 7 |
1 files changed, 3 insertions, 4 deletions
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', |