mirror of https://github.com/zulip/zulip.git
Annotate test_helpers.instrument_url().
This commit is contained in:
parent
ffec98d85c
commit
cdee3dfb53
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue