Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions functions/slack/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def test_verify_web_hook_valid_request(self):
def test_format_slack_message(self):
message = main.format_slack_message('lion', example_response)

assert 'lion' in message['text'].lower()
assert 'lion' in message['attachments'][0]['title'].lower()
# Just make sure there's a result.
assert 'title' in message['attachments'][0]
assert message['attachments'][0]['color'] == '#3367d6'

def test_make_search_request(self):
Expand All @@ -68,9 +68,8 @@ def test_make_search_request(self):
search = entities.search.return_value
search.execute.return_value = example_response
message = main.make_search_request('lion')

assert 'lion' in message['text'].lower()
assert 'lion' in message['attachments'][0]['title'].lower()
# Just make sure there's a result.
assert 'title' in message['attachments'][0]
assert message['attachments'][0]['color'] == '#3367d6'

def test_kg_search(self):
Expand Down