mirror of https://github.com/zulip/zulip.git
Annotate zerver.lib.testing_mocks.
Also fix some annotations in bugdown to match.
This commit is contained in:
parent
157a3efb78
commit
1ca7c3378b
|
@ -110,7 +110,7 @@ def add_a(root, url, link, height="", title=None, desc=None,
|
|||
|
||||
@cache_with_key(lambda tweet_id: tweet_id, cache_name="database", with_statsd_key="tweet_data")
|
||||
def fetch_tweet_data(tweet_id):
|
||||
# type: (text_type) -> Optional[Dict[text_type, text_type]]
|
||||
# type: (str) -> Optional[Dict[str, Any]]
|
||||
if settings.TEST_SUITE:
|
||||
from . import testing_mocks
|
||||
res = testing_mocks.twitter(tweet_id)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from typing import Any, Dict, Optional
|
||||
import ujson
|
||||
|
||||
|
||||
|
@ -236,6 +237,7 @@ MEDIA_TWEET = """{
|
|||
|
||||
|
||||
def twitter(tweet_id):
|
||||
# type: (str) -> Optional[Dict[str, Any]]
|
||||
if tweet_id in ["112652479837110273", "287977969287315456", "287977969287315457"]:
|
||||
return ujson.loads(NORMAL_TWEET)
|
||||
elif tweet_id == "287977969287315458":
|
||||
|
|
Loading…
Reference in New Issue