def go():
     with self.assertRaises(RuntimeError):
         stream = yield from submit("ws://localhost:8182/",
                                    "throw new Exception('error')",
                                    password="******",
                                    username="******",
                                    loop=self.loop)
         yield from stream.read()
Exemple #2
0
 def go():
     with self.assertRaises(RuntimeError):
         stream = yield from submit("ws://localhost:8182/",
                                    "throw new Exception('error')",
                                    password="******",
                                    username="******",
                                    loop=self.loop)
         yield from stream.read()
 def go():
     stream = yield from submit(
         "ws://localhost:8182/", "g.V(12323412)", password="******",
         username="******", loop=self.loop)
     while True:
         msg = yield from stream.read()
         if msg is None:
             break
         self.assertEqual(msg.status_code, 204)
 def go():
     stream = yield from submit(
         "ws://localhost:8182/", "1 + 1", bindings={"x": 1},
         password="******", username="******", loop=self.loop)
     while True:
         msg = yield from stream.read()
         if msg is None:
             break
         self.assertEqual(msg.status_code, 200)
         self.assertEqual(msg.data[0], 2)
Exemple #5
0
 def go():
     stream = yield from submit("ws://localhost:8182/",
                                "g.V(12323412)",
                                password="******",
                                username="******",
                                loop=self.loop)
     while True:
         msg = yield from stream.read()
         if msg is None:
             break
         self.assertEqual(msg.status_code, 204)
Exemple #6
0
 def go():
     stream = yield from submit("ws://localhost:8182/",
                                "1 + 1",
                                bindings={"x": 1},
                                password="******",
                                username="******",
                                loop=self.loop)
     while True:
         msg = yield from stream.read()
         if msg is None:
             break
         self.assertEqual(msg.status_code, 200)
         self.assertEqual(msg.data[0], 2)