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

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