1
0
mirror of https://github.com/django/django.git synced 2025-01-02 22:46:15 +00:00

Refs #373 -- Fixed false failure of test_error_on_comment_pk_conflict.

The test failed with "NOT NULL constraint failed" rather than
"UNIQUE constraint failed: tenant_id, comment_id".
This commit is contained in:
Tim Graham 2024-12-26 21:29:04 -05:00 committed by GitHub
parent fcd9d08379
commit 733d3998e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -128,7 +128,7 @@ class CompositePKTests(TestCase):
def test_error_on_comment_pk_conflict(self):
with self.assertRaises(IntegrityError):
Comment.objects.create(tenant=self.tenant, id=self.comment.id)
Comment.objects.create(tenant=self.tenant, id=self.comment.id, user_id=1)
def test_get_primary_key_columns(self):
self.assertEqual(