aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest/test_thread.py
diff options
context:
space:
mode:
Diffstat (limited to '_pytest/test_thread.py')
-rw-r--r--_pytest/test_thread.py26
1 files changed, 16 insertions, 10 deletions
diff --git a/_pytest/test_thread.py b/_pytest/test_thread.py
index 4095e77..06150a3 100644
--- a/_pytest/test_thread.py
+++ b/_pytest/test_thread.py
@@ -5,33 +5,39 @@ import json
from wee_slack import SlackTS
-thread_ts = SlackTS('1485975824.000004')
+thread_ts = SlackTS("1485975824.000004")
def test_message_has_thread_suffix(realish_eventrouter, team, channel_general):
- datafile = '_pytest/data/websocket/1485975824.48-message.json'
+ datafile = "_pytest/data/websocket/1485975824.48-message.json"
data = json.loads(open(datafile).read())
team.ws.add(data)
realish_eventrouter.receive_ws_callback(team.team_hash, None)
realish_eventrouter.handle_next()
- message_text = channel_general.messages[thread_ts].message_json['_rendered_text']
- assert message_text == 'generally, yep!'
+ message_text = channel_general.messages[thread_ts].message_json["_rendered_text"]
+ assert message_text == "generally, yep!"
- datafile = '_pytest/data/websocket/1485975836.23-message.json'
+ datafile = "_pytest/data/websocket/1485975836.23-message.json"
data = json.loads(open(datafile).read())
team.ws.add(data)
realish_eventrouter.receive_ws_callback(team.team_hash, None)
realish_eventrouter.handle_next()
- message_text = channel_general.messages[thread_ts].message_json['_rendered_text']
- assert message_text == 'generally, yep! <[color lightcyan]>[ Thread: 309 Replies: 1 ]<[color reset]>'
+ message_text = channel_general.messages[thread_ts].message_json["_rendered_text"]
+ assert (
+ message_text
+ == "generally, yep! <[color lightcyan]>[ Thread: 309 Replies: 1 ]<[color reset]>"
+ )
- datafile = '_pytest/data/websocket/1485975842.1-message.json'
+ datafile = "_pytest/data/websocket/1485975842.1-message.json"
data = json.loads(open(datafile).read())
team.ws.add(data)
realish_eventrouter.receive_ws_callback(team.team_hash, None)
realish_eventrouter.handle_next()
- message_text = channel_general.messages[thread_ts].message_json['_rendered_text']
- assert message_text == 'generally, yep! <[color lightcyan]>[ Thread: 309 Replies: 2 ]<[color reset]>'
+ message_text = channel_general.messages[thread_ts].message_json["_rendered_text"]
+ assert (
+ message_text
+ == "generally, yep! <[color lightcyan]>[ Thread: 309 Replies: 2 ]<[color reset]>"
+ )