-
-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Lint - Type consistency (mypy). refactor: Install & test - CPython 3.7 (ubuntu), codecov. refactor: Install & test - CPython 3.7 (ubuntu), codecov (2). refactor: Install & test - CPython 3.7 (ubuntu), codeco (3). refactor: Install & test - CPython 3.7 (ubuntu), codeco (4).
- Loading branch information
Showing
15 changed files
with
52 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -500,13 +500,13 @@ def extra_stream_msg_template() -> Message: | |
|
||
|
||
@pytest.fixture | ||
def dm_template() -> Message: | ||
def pm_template() -> Message: | ||
recipients = display_recipient_factory([(5179, "Boo Boo"), (5140, "Foo Foo")]) | ||
return msg_template_factory(537287, "private", 1520918736, recipients=recipients) | ||
|
||
|
||
@pytest.fixture | ||
def group_dm_template() -> Message: | ||
def group_pm_template() -> Message: | ||
recipients = display_recipient_factory( | ||
[(5179, "Boo Boo"), (5140, "Foo Foo"), (5180, "Bar Bar")] | ||
) | ||
|
@@ -519,12 +519,12 @@ def private_message_fixture(request: Any) -> Message: | |
|
||
|
||
@pytest.fixture( | ||
params=["stream_msg_template", "dm_template", "group_dm_template"], | ||
ids=["stream_message", "dm_message", "group_dm_message"], | ||
params=["stream_msg_template", "pm_template", "group_pm_template"], | ||
ids=["stream_message", "pm_message", "group_pm_message"], | ||
) | ||
def message_fixture(request: Any) -> Message: | ||
""" | ||
Acts as a parametrize fixture for stream msg, dms and group_dms. | ||
Acts as a parametrize fixture for stream msg, dms and group_pms. | ||
""" | ||
# `request` currently does not have an exported Pytest type. | ||
# TODO: Use the exported type when it's made available. | ||
|
@@ -535,8 +535,8 @@ def message_fixture(request: Any) -> Message: | |
@pytest.fixture | ||
def messages_successful_response( | ||
stream_msg_template: Message, | ||
dm_template: Message, | ||
group_dm_template: Message, | ||
pm_template: Message, | ||
group_pm_template: Message, | ||
) -> Dict[str, Any]: | ||
""" | ||
A successful response from a /messages API query. | ||
|
@@ -546,8 +546,8 @@ def messages_successful_response( | |
"anchor": 10000000000000000, | ||
"messages": [ | ||
stream_msg_template, | ||
dm_template, | ||
group_dm_template, | ||
pm_template, | ||
group_pm_template, | ||
], | ||
"result": "success", | ||
"msg": "", | ||
|
@@ -634,10 +634,10 @@ def topics() -> List[str]: | |
], | ||
ids=[ | ||
"stream_mention__stream_wildcard", | ||
"stream+dm_mention__no_wildcard", | ||
"no_mention__stream+dm_wildcard", | ||
"stream+group_mention__dm_wildcard", | ||
"dm_mention__stream+group_wildcard", | ||
"stream+pm_mention__no_wildcard", | ||
"no_mention__stream+pm_wildcard", | ||
"stream+group_mention__pm_wildcard", | ||
"pm_mention__stream+group_wildcard", | ||
"group_mention__all_wildcard", | ||
"all_mention__stream_wildcard", | ||
"stream+group_mention__wildcard", | ||
|
@@ -1060,7 +1060,7 @@ def initial_index() -> Index: | |
|
||
@pytest.fixture | ||
def empty_index( | ||
stream_msg_template: Message, dm_template: Message, group_dm_template: Message | ||
stream_msg_template: Message, pm_template: Message, group_pm_template: Message | ||
) -> Index: | ||
return deepcopy( | ||
Index( | ||
|
@@ -1079,8 +1079,8 @@ def empty_index( | |
lambda: {}, | ||
{ | ||
stream_msg_template["id"]: stream_msg_template, | ||
dm_template["id"]: dm_template, | ||
group_dm_template["id"]: group_dm_template, | ||
pm_template["id"]: pm_template, | ||
group_pm_template["id"]: group_pm_template, | ||
}, | ||
), | ||
) | ||
|
@@ -1140,7 +1140,7 @@ def index_multiple_topic_msg( | |
@pytest.fixture | ||
def index_user(empty_index: Index) -> Index: | ||
""" | ||
Expected index of initial_data when model.narrow = [['dm_with', | ||
Expected index of initial_data when model.narrow = [['pm_with', | ||
'[email protected]'], | ||
""" | ||
user_ids = frozenset({5179, 5140}) | ||
|
@@ -1153,7 +1153,7 @@ def index_user(empty_index: Index) -> Index: | |
@pytest.fixture | ||
def index_user_multiple(empty_index: Index) -> Index: | ||
""" | ||
Expected index of initial_data when model.narrow = [['dm_with', | ||
Expected index of initial_data when model.narrow = [['pm_with', | ||
'[email protected], [email protected]'], | ||
""" | ||
user_ids = frozenset({5179, 5140, 5180}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters