summaryrefslogtreecommitdiff
path: root/tests/check_framework
diff options
context:
space:
mode:
authorAdam Johnson <me@adamj.eu>2020-12-13 16:56:04 +0000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-12-14 18:08:37 +0100
commitcf2ca22a5797cdd53a10954e9811893325b24a30 (patch)
tree83c66866a5a0c573c98de31fda59fb93dd4f5765 /tests/check_framework
parentef39a8829b6a81116876fe97cff8de6b8ec15f49 (diff)
downloaddjango-cf2ca22a5797cdd53a10954e9811893325b24a30.tar.gz
Ensured that registered checks accept keyword arguments.
Diffstat (limited to 'tests/check_framework')
-rw-r--r--tests/check_framework/tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/check_framework/tests.py b/tests/check_framework/tests.py
index cc1718fac8..e669b11c2b 100644
--- a/tests/check_framework/tests.py
+++ b/tests/check_framework/tests.py
@@ -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):