示例#1
0
 def test_init(self):
     """
     Check the passed in event loop is added to the connector object.
     """
     loop = asyncio.get_event_loop()
     c = Connector(loop)
     self.assertEqual(c.event_loop, loop)
示例#2
0
 def test_receive(self):
     """
     Ensures the receive method raises a NotImplemented exception.
     """
     loop = asyncio.get_event_loop()
     c = Connector(loop)
     with self.assertRaises(NotImplementedError):
         c.receive('foo', 'bar', 'baz', 'qux')
示例#3
0
 def test_send(self):
     """
     Ensures the send method raises a NotImplemented exception.
     """
     loop = asyncio.get_event_loop()
     c = Connector(loop)
     with self.assertRaises(NotImplementedError):
         c.send('foo', 'bar')