예제 #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('*****@*****.**'))
예제 #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('*****@*****.**'))
예제 #3
0
 def testBadMarkdown_lastCommand(self):
     fozzie_last = slacklib.command_last('*****@*****.**')
     self.assertIn("not in a format I understand", fozzie_last)
예제 #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)
예제 #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)
예제 #6
0
 def testBadMarkdown_lastCommand(self):
     fozzie_last = slacklib.command_last('*****@*****.**')
     self.assertIn("not in a format I understand", fozzie_last)
예제 #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)
예제 #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)