Example #1
0
 def test_send(self, store_message):
     # send calls store_message with the right args
     back = HttpTesterCacheBackend(self.router, 'backend')
     msg = self.create_outgoing_message()
     back.send(msg)
     self.assertTrue(store_message.called)
     self.assertEqual((HttpTesterMessage.OUTGOING, msg.connection.identity,
                      msg.text), store_message.call_args[0])
Example #2
0
 def test_start(self):
     # .start() returns
     back = HttpTesterCacheBackend(self.router, 'backend')
     back.start()