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