Exemplo n.º 1
0
def test_json():
    resp = yaar.Response(200, yaar.json.dumps({'some': 'json'}).encode())
    assert resp.json()
Exemplo n.º 2
0
    async def req(method, url, **kw):
        nonlocal REQ_TYPE

        REQ_TYPE = method
        return yaar.Response(200, b'some text')
Exemplo n.º 3
0
def test_response():
    resp = yaar.Response(200, b'some text')
    assert resp.text == 'some text'