Refs #25629 -- Added arity class attribute to Func expressions

This commit is contained in:
Sergey Fedoseev 2015-10-31 15:01:08 +05:00 committed by Claude Paroz
parent 03c6ad7ad4
commit 0a26121797
6 changed files with 27 additions and 10 deletions

View file

@ -389,6 +389,9 @@ class FunctionTests(TestCase):
lambda a: (a.lower_name, a.name)
)
with self.assertRaisesMessage(TypeError, "'Lower' takes exactly 1 argument (2 given)"):
Author.objects.update(name=Lower('name', 'name'))
def test_upper(self):
Author.objects.create(name='John Smith', alias='smithj')
Author.objects.create(name='Rhonda')