mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +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
|
@ -18,7 +18,7 @@ class PropertyTests(TestCase):
|
|||
setattr(self.a, 'full_name', 'Paul McCartney')
|
||||
|
||||
# And cannot be used to initialize the class.
|
||||
with self.assertRaisesMessage(TypeError, "'full_name' is an invalid keyword argument"):
|
||||
with self.assertRaisesMessage(TypeError, "Person() got an unexpected keyword argument 'full_name'"):
|
||||
Person(full_name='Paul McCartney')
|
||||
|
||||
# But "full_name_2" has, and it can be used to initialize the class.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue