diff --git a/tests/invalid_models_tests/test_models.py b/tests/invalid_models_tests/test_models.py
index 0f1d1e4dc3..2a7bf02a73 100644
a
|
b
|
class OtherModelTests(SimpleTestCase):
|
824 | 824 | with register_lookup(models.CharField, Lower): |
825 | 825 | self.assertEqual(Model.check(), []) |
826 | 826 | |
| 827 | def test_ordering_pointing_to_related_model_pk(self): |
| 828 | class Parent(models.Model): |
| 829 | pass |
| 830 | |
| 831 | class Child(models.Model): |
| 832 | parent = models.ForeignKey(Parent, models.CASCADE) |
| 833 | |
| 834 | class Meta: |
| 835 | ordering = ('parent__pk',) |
| 836 | |
| 837 | self.assertFalse(Child.check()) |
| 838 | |
827 | 839 | def test_ordering_pointing_to_foreignkey_field(self): |
828 | 840 | class Parent(models.Model): |
829 | 841 | pass |