Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

Commit

Permalink
[tests] only invite test bot to channel when it's not there et
Browse files Browse the repository at this point in the history
  • Loading branch information
lins05 committed Feb 19, 2015
1 parent 5cdf2d2 commit 5320835
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/functional/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ def _has_uploaded_file(self, name, start=None, end=None):
def _join_test_channel(self):
response = self.slacker.channels.join(self.test_channel)
self.cm_chan = response.body['channel']['id']
self.slacker.channels.invite(self.cm_chan, self.testbot_userid)
self._invite_testbot_to_channel()

def _invite_testbot_to_channel(self):
if self.testbot_userid not in self.slacker.channels.info(self.cm_chan).body['channel']['members']:
self.slacker.channels.invite(self.cm_chan, self.testbot_userid)

def _is_bot_message(self, msg):
if msg['type'] != 'message':
Expand Down

0 comments on commit 5320835

Please sign in to comment.