MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / test_parse_req

Function test_parse_req

test/tools/donate_cpu_server_test.py:9–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7 assert url == url_exp and queryParams == queryParams_exp
8
9def test_parse_req():
10 _test_parse_req("", None, None)
11 _test_parse_req("GET / HTTP/1.1", '/', {})
12 _test_parse_req("GET /crash.html HTTP/1.1", '/crash.html', {})
13 _test_parse_req("GET /head-uninitvar HTTP/1.1", '/head-uninitvar', {})
14 _test_parse_req("GET /check_library-std%3A%3Aunordered_set%3A%3Ainsert%28%29 HTTP/1.1", '/check_library-std%3A%3Aunordered_set%3A%3Ainsert%28%29', {})
15 _test_parse_req("GET /head-uninitvar?pkgs=1 HTTP/1.1", '/head-uninitvar', {'pkgs': '1'})
16 _test_parse_req("GET /crash.html?pkgs=1 HTTP/1.1", '/crash.html', {'pkgs': '1'})
17 _test_parse_req("GET /head-uninitvar?pkgs=1&pkgs2=2 HTTP/1.1", '/head-uninitvar', {'pkgs': '1', 'pkgs2': '2'})

Callers

nothing calls this directly

Calls 1

_test_parse_reqFunction · 0.85

Tested by

no test coverage detected