Beispiel #1
0
def test_command_cgi_url():
    req = command._prep_get(command.Operation.list_files, DIR="/DCIM/WOMP",
                            url="http://192.168.0.1")
    print(req.url)
    url, _ = parse.splitquery(req.url)
    assert url == "http://192.168.0.1/command.cgi"
Beispiel #2
0
def test_command_cgi_query():
    req = command._prep_get(command.Operation.list_files, DIR="/DCIM/WOMP")
    _, query = parse.splitquery(req.url)
    query_map = parse.parse_qs(query)
    assert query_map == {"DIR": ["/DCIM/WOMP"], "op": ["100"]}