fix blake formatting

This commit is contained in:
ortyomka 2024-10-20 20:06:33 +02:00
parent 1deb16a929
commit 5cca528b57
2 changed files with 10 additions and 10 deletions

View File

@ -7,11 +7,11 @@ class RequestHandler(http.server.BaseHTTPRequestHandler):
if self.path != "/":
return "Wrong Path", 400
content_type = self.headers.get('Content-Type')
content_type = self.headers.get("Content-Type")
if content_type is None:
return "No Content-Type", 400
correct_content_type = self.headers.get('X-Test-Answer')
correct_content_type = self.headers.get("X-Test-Answer")
if correct_content_type is None:
return "No X-Test-Answer", 400

View File

@ -40,15 +40,15 @@ def start_cluster():
def test_url_content_type_override():
assert (
"200"
== node.query(
f"INSERT INTO FUNCTION url('http://{SERVER_HOSTNAME}:{SERVER_PORT}/', JSONEachRow, 'x UInt8', headers('X-Test-Answer' = 'application/x-ndjson; charset=UTF-8')) SELECT 1)"
).strip()
"200"
== node.query(
f"INSERT INTO FUNCTION url('http://{SERVER_HOSTNAME}:{SERVER_PORT}/', JSONEachRow, 'x UInt8', headers('X-Test-Answer' = 'application/x-ndjson; charset=UTF-8')) SELECT 1)"
).strip()
)
assert (
"200"
== node.query(
f"INSERT INTO FUNCTION url('http://{SERVER_HOSTNAME}:{SERVER_PORT}/', JSONEachRow, 'x UInt8', headers('Content-Type' = 'upyachka', 'X-Test-Answer' = 'upyachka')) SELECT 1)"
).strip()
"200"
== node.query(
f"INSERT INTO FUNCTION url('http://{SERVER_HOSTNAME}:{SERVER_PORT}/', JSONEachRow, 'x UInt8', headers('Content-Type' = 'upyachka', 'X-Test-Answer' = 'upyachka')) SELECT 1)"
).strip()
)