def test_submit(self):

        @trollius.coroutine
        def go():
            stream = yield From(submit(
                "ws://localhost:8182/", "x + x", bindings={"x": 1},
                password="password", username="stephen", loop=self.loop,
                future_class=Future))
            while True:
                msg = yield From(stream.read())
                if msg is None:
                    break
                self.assertEqual(msg.status_code, 200)
                self.assertEqual(msg.data[0], 2)

        self.loop.run_until_complete(go())
dataset/ETHPy150Open davebshow/gremlinclient/tests/test_trollius.py/TrolliusAPITests.test_submit/original