Esempio n. 1
0
 def go():
     connection = yield From(self.graph.connect())
     # build connection
     connection.close()
     stream = Stream(connection, None, "processor", None, None, "stephen", "password", False, False, Future)
     with self.assertRaises(RuntimeError):
         msg = yield From(stream.read())
Esempio n. 2
0
 def go():
     connection = yield From(self.graph.connect())
     # build connection
     connection.close()
     stream = Stream(connection, None, "processor", None, None,
                     "stephen", "password", False, False, Future)
     with self.assertRaises(RuntimeError):
         msg = yield From(stream.read())
Esempio n. 3
0
 def test_null_read_on_closed(self):
     connection = yield self.graph.connect()
     # build connection
     connection.close()
     stream = Stream(connection, None, "processor", None, None, "stephen",
                     "password", False, False, Future)
     with self.assertRaises(RuntimeError):
         msg = yield stream.read()
Esempio n. 4
0
 def test_null_read_on_closed(self):
     connection = yield self.graph.connect()
     # build connection
     connection.close()
     stream = Stream(connection, None, "processor", None, None, "stephen",
                     "password", False, False, Future)
     with self.assertRaises(RuntimeError):
         msg = yield stream.read()
 async def go():
     connection = await self.graph.connect()
     # build connection
     await connection.close()
     stream = Stream(connection, None, "processor", None, self.loop,
                     "stephen", "password", False, False,
                     asyncio.Future)
     with self.assertRaises(RuntimeError):
         msg = await stream.read()