From 0841a31baf649f33d2cb7983705ae15fdcfea5f2 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 2 Jun 2017 14:39:49 -0400 Subject: [PATCH] Fixed admin_views IntegrityError test failure. Regression in 38a5a23c327ab1c816dc56864002ecc66cac4a48. --- tests/admin_views/tests.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index 48310b2929..88aadbb399 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -3236,10 +3236,9 @@ class AdminActionsTest(TestCase): the objects selected for deletion are rendered without separators. Refs #14895. """ - new_pk = 9999 - ExternalSubscriber.objects.filter(id=self.s1.id).update(id=new_pk) + s = ExternalSubscriber.objects.create(id=9999) action_data = { - ACTION_CHECKBOX_NAME: [new_pk, self.s2.pk], + ACTION_CHECKBOX_NAME: [s.pk, self.s2.pk], 'action': 'delete_selected', 'index': 0, }