From 62727e65fbc409e02995c5f713cc20d4c504d043 Mon Sep 17 00:00:00 2001 From: Mads Jensen Date: Mon, 23 Dec 2019 11:56:51 +0100 Subject: [PATCH] Increased test coverage of django.utils.inspect. --- tests/utils_tests/test_inspect.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/utils_tests/test_inspect.py b/tests/utils_tests/test_inspect.py index 3967f2c886..013a09a25d 100644 --- a/tests/utils_tests/test_inspect.py +++ b/tests/utils_tests/test_inspect.py @@ -39,3 +39,11 @@ class TestInspectMethods(unittest.TestCase): self.assertIs(inspect.method_has_no_args(Person.one_argument), False) self.assertIs(inspect.method_has_no_args(Person().no_arguments), True) self.assertIs(inspect.method_has_no_args(Person().one_argument), False) + + def test_func_supports_parameter(self): + self.assertIs(inspect.func_supports_parameter(Person.all_kinds, 'address'), True) + self.assertIs(inspect.func_supports_parameter(Person.all_kinds, 'zone'), False) + + def test_func_accepts_kwargs(self): + self.assertIs(inspect.func_accepts_kwargs(Person.just_args), False) + self.assertIs(inspect.func_accepts_kwargs(Person.all_kinds), True)