curl tests: fix default tests and display

This commit is contained in:
Alexandre Aubin 2024-08-25 13:04:27 +02:00
parent a5b35d218d
commit 28b83f5f95

View file

@ -160,8 +160,8 @@ def run(tests):
def display_result(result): def display_result(result):
if result["effective_url"] == result["url"]: if result["effective_url"] != result["url"]:
print(f"URL : {result['url']} (redirected to -> {result['effective_url']})") print(f"URL : {result['url']} (redirected to: {result['effective_url']})")
else: else:
print(f"URL : {result['url']}") print(f"URL : {result['url']}")
if result['code'] != 200: if result['code'] != 200:
@ -181,7 +181,7 @@ def main():
tests = sys.stdin.read() tests = sys.stdin.read()
if not tests: if not tests.strip():
tests = "home.path = '/'" tests = "home.path = '/'"
tests = toml.loads(tests) tests = toml.loads(tests)