diff options
| author | Jonathan Biemond <jonbiemond@gmail.com> | 2025-12-18 14:43:59 +0100 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-12-19 09:48:15 -0500 |
| commit | b172cbdf33c3eaea6a5c4a53da2ed0e46306a625 (patch) | |
| tree | 9e8300d0e134f9cd7f7a38c5ae1871b475799af7 /tests/constraints | |
| parent | 73c987eb3b6a96300f7238dff32caf53cafe2098 (diff) | |
Fixed #36808 -- Required name argument in UniqueConstraint signature.
By trading ValueError for TypeError for omitted name arguments,
we gain a little clarity.
Diffstat (limited to 'tests/constraints')
| -rw-r--r-- | tests/constraints/tests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/constraints/tests.py b/tests/constraints/tests.py index f988121528..39b170125f 100644 --- a/tests/constraints/tests.py +++ b/tests/constraints/tests.py @@ -1462,7 +1462,7 @@ class UniqueConstraintTests(TestCase): def test_requires_name(self): msg = "A unique constraint must be named." with self.assertRaisesMessage(ValueError, msg): - models.UniqueConstraint(fields=["field"]) + models.UniqueConstraint(fields=["field"], name="") def test_database_default(self): models.UniqueConstraint( |
