diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2019-08-24 17:25:51 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2019-08-25 19:42:06 +0200 |
commit | 88f02db6f1bdade3c745123a6886bf4f47a4ed9c (patch) | |
tree | b9fa1cb11b6d89cf90a412b59eb7825def8dcd15 /_pytest | |
parent | 73c79f2960f5852f56879e26c57cb00043cbe343 (diff) | |
download | wee-slack-88f02db6f1bdade3c745123a6886bf4f47a4ed9c.tar.gz |
Include @ in subteam handle
Subteams/usergroups should never be used without the @.
Diffstat (limited to '_pytest')
-rw-r--r-- | _pytest/test_linkifytext.py | 4 | ||||
-rw-r--r-- | _pytest/test_processsubteamupdated.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/_pytest/test_linkifytext.py b/_pytest/test_linkifytext.py index a31fa6d..fb251b8 100644 --- a/_pytest/test_linkifytext.py +++ b/_pytest/test_linkifytext.py @@ -40,9 +40,9 @@ def test_linkifytext_names_with_apostrophe(team): def test_linkifytext_names_with_subgroup_notification(team): subteam = team.subteams['TGX0ALBK3'] message = 'This is a message for a subteam' - text = linkify_text('@{}: {}'.format(subteam.handle, message), team) + text = linkify_text('{}: {}'.format(subteam.handle, message), team) - assert text == '<!subteam^{}|@{}>: {}'.format(subteam.identifier, subteam.handle, message) + assert text == '<!subteam^{}|{}>: {}'.format(subteam.identifier, subteam.handle, message) def test_linkifytext_at_channel(team): text = linkify_text('@channel: my test message', team) diff --git a/_pytest/test_processsubteamupdated.py b/_pytest/test_processsubteamupdated.py index 0a98aaa..94c6054 100644 --- a/_pytest/test_processsubteamupdated.py +++ b/_pytest/test_processsubteamupdated.py @@ -13,6 +13,6 @@ def test_process_subteam_self_updated(realish_eventrouter, team): realish_eventrouter.handle_next() subteam = team.subteams['TGX0ALBK3'] - assert data['subteam']['handle'] == subteam.handle + assert '@{}'.format(data['subteam']['handle']) == subteam.handle assert data['subteam']['description'] == subteam.description assert data['subteam']['name'] == subteam.name |