示例#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'