Skip to content

Commit 88bb614

Browse files
committed
tests: model: Extend other tests to incorporate both mentioned flags.
This commit expands some of the fixtures of present tests with the mentioned/wildcard_mentioned flags to make the tests more robust and generalized.
1 parent c594083 commit 88bb614

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/model/test_model.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,8 @@ def test_toggle_stream_muted_status(
888888
(["read"], "add"),
889889
(["read", "starred"], "remove"),
890890
(["starred", "read"], "remove"),
891+
(["read", "mentioned", "wildcard_mentioned"], "add"),
892+
(["mentioned", "wildcard_mentioned", "starred"], "remove"),
891893
],
892894
)
893895
def test_toggle_message_star_status(
@@ -1983,11 +1985,18 @@ def test_update_star_status_invalid_operation(
19831985
("add", 1, ["read"], ["read", "starred"]),
19841986
("add", 1, ["starred"], ["starred"]),
19851987
("add", 1, ["read", "starred"], ["read", "starred"]),
1988+
("add", 1, ["mentioned"], ["mentioned", "starred"]),
1989+
("add", 1, ["mentioned", "starred"], ["mentioned", "starred"]),
1990+
("add", 1, ["wildcard_mentioned"], ["wildcard_mentioned", "starred"]),
19861991
("remove", -1, [], []),
19871992
("remove", -1, ["read"], ["read"]),
19881993
("remove", -1, ["starred"], []),
19891994
("remove", -1, ["read", "starred"], ["read"]),
19901995
("remove", -1, ["starred", "read"], ["read"]),
1996+
("remove", -1, ["mentioned"], ["mentioned"]),
1997+
("remove", -1, ["wildcard_mentioned"], ["wildcard_mentioned"]),
1998+
("remove", -1, ["mentioned", "starred"], ["mentioned"]),
1999+
("remove", -1, ["wildcard_mentioned", "starred"], ["wildcard_mentioned"]),
19912000
],
19922001
)
19932002
def test_update_star_status(
@@ -2066,11 +2075,19 @@ def test_update_star_status(
20662075
("add", ["read"], ["read"]),
20672076
("add", ["starred"], ["starred", "read"]),
20682077
("add", ["read", "starred"], ["read", "starred"]),
2078+
("add", ["mentioned"], ["mentioned", "read"]),
2079+
("add", ["read", "mentioned"], ["read", "mentioned"]),
2080+
("add", ["mentioned", "starred"], ["mentioned", "starred", "read"]),
2081+
("add", ["wildcard_mentioned"], ["wildcard_mentioned", "read"]),
20692082
("remove", [], []),
20702083
("remove", ["read"], ["read"]), # msg cannot be marked 'unread'
20712084
("remove", ["starred"], ["starred"]),
2085+
("remove", ["mentioned"], ["mentioned"]),
20722086
("remove", ["starred", "read"], ["starred", "read"]),
20732087
("remove", ["read", "starred"], ["read", "starred"]),
2088+
("remove", ["read", "mentioned"], ["read", "mentioned"]),
2089+
("remove", ["wildcard_mentioned"], ["wildcard_mentioned"]),
2090+
("remove", ["read", "wildcard_mentioned"], ["read", "wildcard_mentioned"]),
20742091
],
20752092
)
20762093
def test_update_read_status(

0 commit comments

Comments
 (0)