def testListCommand_formatting(self): # user with snippet should get back a formatted, numbered list response = slacklib.command_list('*****@*****.**') self.assertIn('> :pushpin: *[0]* went for a walk', response) self.assertIn( '> :pushpin: *[2]* hoping to sniff more things! #yolo', response )
def testBadMarkdown_listCommand(self): toby_recent = slacklib.command_list('*****@*****.**') self.assertIn("not in a format I understand", toby_recent)
def testListCommand_noAccount(self): # user without an account should get a helpful error message response = slacklib.command_list('*****@*****.**') self.assertIn("You don't appear to have a snippets account", response)
def testListCommand_empty(self): # user without a recent snippet should get a helpful message response = slacklib.command_list('*****@*****.**') self.assertIn( "You don't have any snippets for this week yet!", response )
def testListCommand_formatting(self): # user with snippet should get back a formatted, numbered list response = slacklib.command_list('*****@*****.**') self.assertIn('> :pushpin: *[0]* went for a walk', response) self.assertIn('> :pushpin: *[2]* hoping to sniff more things! #yolo', response)
def testListCommand_empty(self): # user without a recent snippet should get a helpful message response = slacklib.command_list('*****@*****.**') self.assertIn("You don't have any snippets for this week yet!", response)