Example #1
0
 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
     )
Example #2
0
 def testBadMarkdown_listCommand(self):
     toby_recent = slacklib.command_list('*****@*****.**')
     self.assertIn("not in a format I understand", toby_recent)
Example #3
0
 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)
Example #4
0
 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
     )
Example #5
0
 def testBadMarkdown_listCommand(self):
     toby_recent = slacklib.command_list('*****@*****.**')
     self.assertIn("not in a format I understand", toby_recent)
Example #6
0
 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)
Example #7
0
 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)
Example #8
0
 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)