aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2019-04-03 10:24:57 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2019-04-03 10:24:57 +0200
commitea3ec06598d9fc4dff30f7eb7ffc082ef0d42c49 (patch)
tree4709a5be7f4c13cb4ef068450f8d17b140e5ccbf /_pytest
parent32d63857a0f7f00fc462f9069e32f22d803985fe (diff)
downloadwee-slack-ea3ec06598d9fc4dff30f7eb7ffc082ef0d42c49.tar.gz
Remove channel parameter from linkify_text
This parameter is not used in the function.
Diffstat (limited to '_pytest')
-rw-r--r--_pytest/test_linkifytext.py23
1 files changed, 8 insertions, 15 deletions
diff --git a/_pytest/test_linkifytext.py b/_pytest/test_linkifytext.py
index da672dc..da1586e 100644
--- a/_pytest/test_linkifytext.py
+++ b/_pytest/test_linkifytext.py
@@ -13,57 +13,50 @@ from wee_slack import linkify_text
def test_linkifytext_does_partial_html_entity_encoding(realish_eventrouter):
team = realish_eventrouter.teams.values()[0]
- channel = team.channels.values()[0]
- text = linkify_text('& < > \' "', team, channel)
+ text = linkify_text('& < > \' "', team)
assert text == '&amp; &lt; &gt; \' "'
def test_linkifytext_names_with_paranthesis(realish_eventrouter):
team = realish_eventrouter.teams.values()[0]
- channel = team.channels.values()[0]
- text = linkify_text('@JohnDoe(jdoe): my test message', team, channel)
+ text = linkify_text('@JohnDoe(jdoe): my test message', team)
assert text == '@JohnDoe(jdoe): my test message'
def test_linkifytext_names_with_accents(realish_eventrouter):
team = realish_eventrouter.teams.values()[0]
- channel = team.channels.values()[0]
- text = linkify_text('@ÁrvíztűrőTükörfúrógép(atukorfurogep): my test message', team, channel)
+ text = linkify_text('@ÁrvíztűrőTükörfúrógép(atukorfurogep): my test message', team)
assert text == '@ÁrvíztűrőTükörfúrógép(atukorfurogep): my test message'
def test_linkifytext_formatting_characters(realish_eventrouter):
team = realish_eventrouter.teams.values()[0]
- channel = team.channels.values()[0]
- text = linkify_text('\x02\x1Dmy test message\x1D\x02', team, channel)
+ text = linkify_text('\x02\x1Dmy test message\x1D\x02', team)
assert text == '*_my test message_*'
def test_linkifytext_with_many_paranthesis(realish_eventrouter):
team = realish_eventrouter.teams.values()[0]
- channel = team.channels.values()[0]
- text = linkify_text('@k(o(v)a)())s: my(( test) message', team, channel)
+ text = linkify_text('@k(o(v)a)())s: my(( test) message', team)
assert text == '@k(o(v)a)())s: my(( test) message'
def test_linkifytext_names_with_apostrophe(realish_eventrouter):
team = realish_eventrouter.teams.values()[0]
- channel = team.channels.values()[0]
- text = linkify_text('@O\'Connor: my test message', team, channel)
+ text = linkify_text('@O\'Connor: my test message', team)
assert text == '@O\'Connor: my test message'
def test_linkifytext_at_channel(realish_eventrouter):
team = realish_eventrouter.teams.values()[0]
- channel = team.channels.values()[0]
- text = linkify_text('@channel: my test message', team, channel)
+ text = linkify_text('@channel: my test message', team)
assert text == '<!channel>: my test message'
@@ -71,6 +64,6 @@ def test_linkifytext_channel(realish_eventrouter):
team = realish_eventrouter.teams.values()[0]
channel = team.channels.values()[0]
- text = linkify_text('#{}: my test message'.format(channel.name), team, channel)
+ text = linkify_text('#{}: my test message'.format(channel.name), team)
assert text == '<#{}|{}>: my test message'.format(channel.id, channel.name)