Beispiel #1
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()
Beispiel #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()
Beispiel #3
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)
Beispiel #4
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)
Beispiel #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)
Beispiel #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)