1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Fixed AdminViewDeletedObjectsTest.test_cyclic failure when using --keepdb.

This changes to hardcoded pks when hardcoded fks are used.
This commit is contained in:
Mariusz Felisiak 2022-12-06 11:14:32 +01:00 committed by GitHub
parent 845a5db38f
commit 29b6a177d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)