summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAdam Chainz <me@adamj.eu>2016-11-20 18:21:59 +0000
committerSimon Charette <charettes@users.noreply.github.com>2016-11-20 13:21:59 -0500
commitcc1f6f26b68223bb5b332c774422173d7800bf80 (patch)
tree5a39249b0a7bbda84f989a0b53bdbe960b9f6d87 /tests
parenta269018e8695bb8cc65841c408c6024801130085 (diff)
Fixed #27514 -- Tested Model.__init__ excessive number of fields.
Diffstat (limited to 'tests')
-rw-r--r--tests/model_regress/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/model_regress/tests.py b/tests/model_regress/tests.py
index 3990143e2d..bd8e927be6 100644
--- a/tests/model_regress/tests.py
+++ b/tests/model_regress/tests.py
@@ -17,6 +17,11 @@ from .models import (
class ModelTests(TestCase):
+ def test_model_init_too_many_args(self):
+ msg = "Number of args exceeds number of fields"
+ with self.assertRaisesMessage(IndexError, msg):
+ Worker(1, 2, 3, 4)
+
# The bug is that the following queries would raise:
# "TypeError: Related Field has invalid lookup: gte"
def test_related_gte_lookup(self):