mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #29517 -- Rephrased error message when passing incorrect kwarg to model constructor
This commit is contained in:
committed by
Claude Paroz
parent
02cd16a7a0
commit
4c36414323
@@ -65,7 +65,7 @@ class ModelInstanceCreationTests(TestCase):
|
||||
self.assertEqual(a.headline, 'Fourth article')
|
||||
|
||||
def test_cannot_create_instance_with_invalid_kwargs(self):
|
||||
with self.assertRaisesMessage(TypeError, "'foo' is an invalid keyword argument for this function"):
|
||||
with self.assertRaisesMessage(TypeError, "Article() got an unexpected keyword argument 'foo'"):
|
||||
Article(
|
||||
id=None,
|
||||
headline='Some headline',
|
||||
|
||||
Reference in New Issue
Block a user