Skip to content
This repository was archived by the owner on Jun 19, 2019. It is now read-only.

Commit 8873491

Browse files
committed
implementing travis take 2
1 parent b90857f commit 8873491

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ install:
1010
- pip install -r requirements.txt
1111

1212
script:
13-
- "PYTHONPATH=. py.test --cov=decorators_library tests"
13+
- py.test

tests/test_basic_functionality.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ def test_event_handler_message_event_logs_event(self):
2525
"""
2626
with LogCapture() as capture:
2727
app.event_handler(MESSAGE_EVENT)
28-
capture.check(('src.app', 'INFO', 'Message event'))
28+
capture.check(
29+
('src.app.all_events',
30+
'INFO',
31+
"{'type': 'message', 'channel': 'C8DA69KM4', 'user': 'U8DG4B3EK', 'text': "
32+
"'.', 'ts': '1513003671.000412', 'source_team': 'T8CJ90MQV', 'team': "
33+
"'T8CJ90MQV'}"),
34+
('src.app', 'INFO', 'Message event')
35+
)
2936

3037

3138
@mock.patch('src.app.slack_client')
@@ -83,7 +90,9 @@ def test_slack_client_called_with_correct_params(self, mock_client, mock_builder
8390
"""
8491
Asserts new_member calls the client api with correct params.
8592
"""
86-
app.new_member(NEW_MEMBER)
93+
with LogCapture() as capture:
94+
app.new_member(NEW_MEMBER)
95+
8796
mock_client.api_call.assert_called_with('chat.postMessage',
8897
channel=NEW_MEMBER['user']['id'],
8998
text=MESSAGE, as_user=True)

0 commit comments

Comments
 (0)