mirror of https://github.com/zulip/zulip.git
request: Fix unnecessary translation tag for assertion.
This commit is contained in:
parent
aacef438bc
commit
ac20872f9d
|
@ -75,7 +75,8 @@ class REQ(object):
|
||||||
self.argument_type = argument_type
|
self.argument_type = argument_type
|
||||||
|
|
||||||
if converter and validator:
|
if converter and validator:
|
||||||
raise Exception(_('converter and validator are mutually exclusive'))
|
# Not user-facing, so shouldn't be tagged for translation
|
||||||
|
raise AssertionError('converter and validator are mutually exclusive')
|
||||||
|
|
||||||
# Extracts variables from the request object and passes them as
|
# Extracts variables from the request object and passes them as
|
||||||
# named function arguments. The request object must be the first
|
# named function arguments. The request object must be the first
|
||||||
|
|
|
@ -139,7 +139,7 @@ class DecoratorTestCase(TestCase):
|
||||||
|
|
||||||
def test_REQ_converter_and_validator_invalid(self):
|
def test_REQ_converter_and_validator_invalid(self):
|
||||||
# type: () -> None
|
# type: () -> None
|
||||||
with self.assertRaisesRegex(Exception, "converter and validator are mutually exclusive"):
|
with self.assertRaisesRegex(AssertionError, "converter and validator are mutually exclusive"):
|
||||||
@has_request_variables
|
@has_request_variables
|
||||||
def get_total(request, numbers=REQ(validator=check_list(check_int),
|
def get_total(request, numbers=REQ(validator=check_list(check_int),
|
||||||
converter=lambda: None)):
|
converter=lambda: None)):
|
||||||
|
|
Loading…
Reference in New Issue