Fixed #29517 -- Rephrased error message when passing incorrect kwarg to model constructor

This commit is contained in:
Federico Bond 2018-06-25 09:30:58 +02:00 committed by Claude Paroz
parent 02cd16a7a0
commit 4c36414323
3 changed files with 3 additions and 3 deletions

View file

@ -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',