mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #29517 -- Rephrased error message when passing incorrect kwarg to model constructor
This commit is contained in:
parent
02cd16a7a0
commit
4c36414323
3 changed files with 3 additions and 3 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue