Example #1
0
 def testLastCommand_empty(self):
     # user without a snippet last week should get a helpful message
     expect = "You didn't have any snippets last week!"
     # stuart never fills out
     self.assertIn(expect, slacklib.command_last('*****@*****.**'))
     # toby skipped last week
     self.assertIn(expect, slacklib.command_last('*****@*****.**'))
Example #2
0
 def testLastCommand_empty(self):
     # user without a snippet last week should get a helpful message
     expect = "You didn't have any snippets last week!"
     # stuart never fills out
     self.assertIn(expect, slacklib.command_last('*****@*****.**'))
     # toby skipped last week
     self.assertIn(expect, slacklib.command_last('*****@*****.**'))
Example #3
0
 def testBadMarkdown_lastCommand(self):
     fozzie_last = slacklib.command_last('*****@*****.**')
     self.assertIn("not in a format I understand", fozzie_last)
Example #4
0
 def testLastCommand_noAccount(self):
     # user without an account should get a helpful error message
     response = slacklib.command_last('*****@*****.**')
     self.assertIn("You don't appear to have a snippets account", response)
Example #5
0
 def testLastCommand_formatting(self):
     # user with snippet should get back a formatted, numbered list
     response = slacklib.command_last('*****@*****.**')
     self.assertIn('> :pushpin: *[0]* lots of walks this week', response)
Example #6
0
 def testBadMarkdown_lastCommand(self):
     fozzie_last = slacklib.command_last('*****@*****.**')
     self.assertIn("not in a format I understand", fozzie_last)
Example #7
0
 def testLastCommand_noAccount(self):
     # user without an account should get a helpful error message
     response = slacklib.command_last('*****@*****.**')
     self.assertIn("You don't appear to have a snippets account", response)
Example #8
0
 def testLastCommand_formatting(self):
     # user with snippet should get back a formatted, numbered list
     response = slacklib.command_last('*****@*****.**')
     self.assertIn('> :pushpin: *[0]* lots of walks this week', response)