Exemplo n.º 1
0
    def test_concurrent_receive(self):
        req = self.make_request("GET", "/")
        ws = WebSocketResponse()
        self.loop.run_until_complete(ws.prepare(req))
        ws._waiting = True

        self.assertRaises(RuntimeError, self.loop.run_until_complete, ws.receive())
Exemplo n.º 2
0
def function2521(function271):
    var4739 = function271('GET', '/')
    var1693 = WebSocketResponse()
    yield from var1693.prepare(var4739)
    var1693._waiting = True
    with pytest.raises(RuntimeError):
        yield from var1693.function1900()
Exemplo n.º 3
0
async def test_concurrent_receive(make_request):
    req = make_request('GET', '/')
    ws = WebSocketResponse()
    await ws.prepare(req)
    ws._waiting = True

    with pytest.raises(RuntimeError):
        await ws.receive()
Exemplo n.º 4
0
async def test_concurrent_receive(make_request):
    req = make_request('GET', '/')
    ws = WebSocketResponse()
    await ws.prepare(req)
    ws._waiting = True

    with pytest.raises(RuntimeError):
        await ws.receive()
Exemplo n.º 5
0
    def test_concurrent_receive(self):
        req = self.make_request('GET', '/')
        ws = WebSocketResponse()
        ws.start(req)
        ws._waiting = True

        self.assertRaises(
            RuntimeError, self.loop.run_until_complete, ws.receive())
Exemplo n.º 6
0
def test_concurrent_receive(make_request):
    req = make_request("GET", "/")
    ws = WebSocketResponse()
    yield from ws.prepare(req)
    ws._waiting = True

    with pytest.raises(RuntimeError):
        yield from ws.receive()
Exemplo n.º 7
0
async def test_concurrent_receive(make_request: Any) -> None:
    req = make_request("GET", "/")
    ws = WebSocketResponse()
    await ws.prepare(req)
    ws._waiting = True

    with pytest.raises(RuntimeError):
        await ws.receive()