mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
Annotate test_helpers.instrument_url().
This commit is contained in:
@@ -199,7 +199,10 @@ class POSTRequestMock(object):
|
|||||||
INSTRUMENTING = os.environ.get('TEST_INSTRUMENT_URL_COVERAGE', '') == 'TRUE'
|
INSTRUMENTING = os.environ.get('TEST_INSTRUMENT_URL_COVERAGE', '') == 'TRUE'
|
||||||
INSTRUMENTED_CALLS = []
|
INSTRUMENTED_CALLS = []
|
||||||
|
|
||||||
|
UrlFuncT = Callable[..., HttpResponse] # TODO: make more specific
|
||||||
|
|
||||||
def instrument_url(f):
|
def instrument_url(f):
|
||||||
|
# type: (UrlFuncT) -> UrlFuncT
|
||||||
if not INSTRUMENTING:
|
if not INSTRUMENTING:
|
||||||
return f
|
return f
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user