mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
Ensured that registered checks accept keyword arguments.
This commit is contained in:
parent
ef39a8829b
commit
cf2ca22a57
2 changed files with 14 additions and 1 deletions
|
@ -66,6 +66,14 @@ class SystemCheckFrameworkTests(SimpleTestCase):
|
|||
self.assertEqual(errors, errors2)
|
||||
self.assertEqual(sorted(errors), [4, 5])
|
||||
|
||||
def test_register_no_kwargs_error(self):
|
||||
registry = CheckRegistry()
|
||||
msg = 'Check functions must accept keyword arguments (**kwargs).'
|
||||
with self.assertRaisesMessage(TypeError, msg):
|
||||
@registry.register
|
||||
def no_kwargs(app_configs, databases):
|
||||
pass
|
||||
|
||||
|
||||
class MessageTests(SimpleTestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue