예제 #1
0
 def testCallsStoreIfTagCache(self, mock):
     routes.config('tag', 'elephant')
     routes.process_outside_message("123", "Hail YESOCH")
     mock.assert_called_with("elephant", '123', "Hail YESOCH")
예제 #2
0
 def testPanicBypassesMessageSaving(self, mock):
     routes.config('tag', 'abc')
     routes.panic()
     routes.process_outside_message('1234', 'this is tagged')
     mock.assert_called_with('1234', 'this is tagged')
예제 #3
0
 def testCallsForwardIfNoTagCache(self, mock):
     routes.process_outside_message("123", "Hail YESOCH")
     mock.assert_called_with("123", "Hail YESOCH")
예제 #4
0
 def testGetsMessage(self, mock):
     routes.config('tag', 'abc')
     routes.process_outside_message('1234', 'this is tagged')
     output = routes.listen('abc')
     mock.assert_called_with('1234', 'this is tagged')