Ejemplo n.º 1
0
def test_parse_jrpc_namespaces(full_urn_test_request_dict):
    jsonrpc_request, urn_parsed, urn, url, ttl, timeout = full_urn_test_request_dict
    result = _parse_jrpc(jsonrpc_request)
    assert result['namespace'] == urn_parsed['namespace']
    assert result['api'] == urn_parsed['api']
    assert result['method'] == urn_parsed['method']
    assert result['params'] == urn_parsed['params']
Ejemplo n.º 2
0
def test_parse_jrpc_namespace_is_appbase(appbase_request_and_response):
    req, resp = appbase_request_and_response
    result = _parse_jrpc(req)
    assert result['namespace'] == 'appbase'
Ejemplo n.º 3
0
def test_parse_jrpc_namespace_is_steemd(steemd_request_and_response):
    req, resp = steemd_request_and_response
    result = _parse_jrpc(req)
    assert result['namespace'] == 'steemd'
Ejemplo n.º 4
0
def test_parse_jrpc_errors(jsonrpc_request, expected):
    with pytest.raises(expected):
        result = _parse_jrpc(jsonrpc_request)