diff --git a/tools/test-backend b/tools/test-backend index b611606e5a..b483349252 100755 --- a/tools/test-backend +++ b/tools/test-backend @@ -77,7 +77,6 @@ not_yet_fully_covered = { 'zerver/lib/message.py', 'zerver/lib/notifications.py', 'zerver/lib/push_notifications.py', - 'zerver/lib/request.py', 'zerver/lib/upload.py', 'zerver/lib/validator.py', 'zerver/models.py', diff --git a/zerver/tests/test_decorators.py b/zerver/tests/test_decorators.py index 83ac175024..654beb0286 100644 --- a/zerver/tests/test_decorators.py +++ b/zerver/tests/test_decorators.py @@ -137,6 +137,15 @@ class DecoratorTestCase(TestCase): result = get_total(request) self.assertEqual(result, 21) + def test_REQ_converter_and_validator_invalid(self): + # type: () -> None + with self.assertRaisesRegex(Exception, "converter and validator are mutually exclusive"): + @has_request_variables + def get_total(request, numbers=REQ(validator=check_list(check_int), + converter=lambda: None)): + # type: (HttpRequest, Iterable[int]) -> int + return sum(numbers) # nocoverage -- isn't intended to be run + def test_REQ_validator(self): # type: () -> None