mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
test_helpers: Fix a nonexistent import.
This module doesn't exist, and never did; the name appears to be a mistaken variant of the module that really does contain ZulipTestCase. So, fix the import to use the real name. This would never have worked at runtime, which is why it's in an `if False:`. It's also an example of the kind of error that can be hidden by `ignore_missing_imports`; we'd have caught the issue immediately if we hadn't had a blanket application of that flag in place.
This commit is contained in:
@@ -46,9 +46,7 @@ from zerver.models import (
|
||||
)
|
||||
|
||||
from zerver.lib.request import JsonableError
|
||||
|
||||
if False:
|
||||
from zerver.lib.test_case import ZulipTestCase
|
||||
from zerver.lib.test_classes import ZulipTestCase
|
||||
|
||||
import collections
|
||||
import base64
|
||||
@@ -291,7 +289,7 @@ def instrument_url(f: UrlFuncT) -> UrlFuncT:
|
||||
if not INSTRUMENTING: # nocoverage -- option is always enabled; should we remove?
|
||||
return f
|
||||
else:
|
||||
def wrapper(self: 'ZulipTestCase', url: str, info: Dict[str, Any]={},
|
||||
def wrapper(self: ZulipTestCase, url: str, info: Dict[str, Any]={},
|
||||
**kwargs: Any) -> HttpResponse:
|
||||
start = time.time()
|
||||
result = f(self, url, info, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user