예제 #1
0
파일: tests.py 프로젝트: jucacrispim/yaar
def test_json():
    resp = yaar.Response(200, yaar.json.dumps({'some': 'json'}).encode())
    assert resp.json()
예제 #2
0
파일: tests.py 프로젝트: jucacrispim/yaar
    async def req(method, url, **kw):
        nonlocal REQ_TYPE

        REQ_TYPE = method
        return yaar.Response(200, b'some text')
예제 #3
0
파일: tests.py 프로젝트: jucacrispim/yaar
def test_response():
    resp = yaar.Response(200, b'some text')
    assert resp.text == 'some text'