Beispiel #1
0
def test_parse_jrpc_namespaces(full_urn_test_request_dicts):
    jsonrpc_request, urn_parsed, urn, url, ttl, timeout = full_urn_test_request_dicts
    result = URN._parse_jrpc(jsonrpc_request)
    assert result == urn_parsed
Beispiel #2
0
def test_parse_jrpc_namespace_is_steemd(just_steemd_requests_and_responses):
    req, resp = just_steemd_requests_and_responses
    result = URN._parse_jrpc(req)
    assert result['namespace'] == 'steemd'
Beispiel #3
0
def test_parse_jrpc_namespace_is_appbase(appbase_requests_and_responses):
    req, resp = appbase_requests_and_responses
    result = URN._parse_jrpc(req)
    assert result['namespace'] == 'appbase'
Beispiel #4
0
def test_parse_jrpc_errors(jsonrpc_request, expected):
    with pytest.raises(expected):
        result = URN._parse_jrpc(jsonrpc_request)