Fixes following tests on the battlefield

This commit is contained in:
Alexandre Aubin 2020-04-16 01:28:10 +00:00
parent e8bd827f96
commit 9156050073

View file

@ -119,7 +119,7 @@ async def check_http(request):
assert data, "Empty request body" assert data, "Empty request body"
assert isinstance(data, dict), "Request body ain't a proper dict" assert isinstance(data, dict), "Request body ain't a proper dict"
assert "domains" in data, "No 'domains' provided" assert "domains" in data, "No 'domains' provided"
assert "nounce" in data, "No 'nounce' provided" assert "nonce" in data, "No 'nonce' provided"
# Check domain list format # Check domain list format
assert isinstance(data["domains"], list), "'domains' ain't a list" assert isinstance(data["domains"], list), "'domains' ain't a list"
@ -152,11 +152,11 @@ async def check_http(request):
} }
}, status=400) }, status=400)
domain = data["domains"] domains = data["domains"]
nonce = data["nonce"] nonce = data["nonce"]
return json_response({ return json_response({
"http": {domain: await check_http_domain(ip, domain, nonce)} for domain in domains} "http": {domain: await check_http_domain(ip, domain, nonce) for domain in domains}
}) })