summaryrefslogtreecommitdiff
path: root/tests/composite_pk
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2024-12-26 21:29:04 -0500
committerGitHub <noreply@github.com>2024-12-26 23:29:04 -0300
commit733d3998e2b452ace5c4382a9f6efa698b576383 (patch)
tree78d368a5d3417568825d31d85ec8b7bdb159ba9d /tests/composite_pk
parentfcd9d08379a2aee3b2c49eab0d0b8db6fd66d091 (diff)
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".
Diffstat (limited to 'tests/composite_pk')
-rw-r--r--tests/composite_pk/tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/composite_pk/tests.py b/tests/composite_pk/tests.py
index 25e5f2fdd5..4ebdbc371e 100644
--- a/tests/composite_pk/tests.py
+++ b/tests/composite_pk/tests.py
@@ -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(