models: Model creation with kwarg matching method name should fail
This commit is contained in:
parent
34d444e563
commit
693a3d3ec6
@ -79,6 +79,13 @@ class ArtistTest(unittest.TestCase):
|
||||
test = lambda: Artist(foo='baz')
|
||||
self.assertRaises(TypeError, test)
|
||||
|
||||
def test_invalid_kwarg_with_name_matching_method(self):
|
||||
test = lambda: Artist(copy='baz')
|
||||
self.assertRaises(TypeError, test)
|
||||
|
||||
test = lambda: Artist(serialize='baz')
|
||||
self.assertRaises(TypeError, test)
|
||||
|
||||
def test_repr(self):
|
||||
self.assertEquals(
|
||||
"Artist(name=u'name', uri=u'uri')",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user