diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-12-06 11:14:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-06 11:14:32 +0100 |
commit | 29b6a177d81b9a8d833529bebfc67ef48bda3c7f (patch) | |
tree | f7b77d222f9b15bcf74617bdb9c16b2d4fa2ffed /tests/admin_views | |
parent | 845a5db38fd3d2695af8cece78951729936a0196 (diff) | |
download | django-29b6a177d81b9a8d833529bebfc67ef48bda3c7f.tar.gz |
Fixed AdminViewDeletedObjectsTest.test_cyclic failure when using --keepdb.
This changes to hardcoded pks when hardcoded fks are used.
Diffstat (limited to 'tests/admin_views')
-rw-r--r-- | tests/admin_views/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index 9796703ad1..4d1506d257 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -3371,8 +3371,8 @@ class AdminViewDeletedObjectsTest(TestCase): cls.ssh1 = SuperSecretHideout.objects.create( location="super floating castle!", supervillain=cls.sv1 ) - cls.cy1 = CyclicOne.objects.create(name="I am recursive", two_id=1) - cls.cy2 = CyclicTwo.objects.create(name="I am recursive too", one_id=1) + cls.cy1 = CyclicOne.objects.create(pk=1, name="I am recursive", two_id=1) + cls.cy2 = CyclicTwo.objects.create(pk=1, name="I am recursive too", one_id=1) def setUp(self): self.client.force_login(self.superuser) |