From d5f51a6be9ccf90a789bb108974981c864043322 Mon Sep 17 00:00:00 2001 From: James Napier Date: Mon, 11 Dec 2023 21:32:39 +1300 Subject: [PATCH] fix tests --- api/test_main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/test_main.py b/api/test_main.py index dbd8e2c..275ed2e 100644 --- a/api/test_main.py +++ b/api/test_main.py @@ -32,14 +32,14 @@ def test_minimise_code(): json={"code": SMALL_PROGRAM, "lang": "python3", "indentation": " "}, ) assert response.status_code == 200 - assert response.json().code == {"lang": "python3", "code": SMALL_PROGRAM_MIN} + assert response.json() == {"lang": "python3", "code": SMALL_PROGRAM_MIN} response = client.post( url="/minimise/", json={"code": SMALL_PROGRAM, "lang": "python3", "indentation": " "}, ) assert response.status_code == 200 - assert response.json().code == {"lang": "python3", "code": SMALL_PROGRAM_MIN_TINY} + assert response.json() == {"lang": "python3", "code": SMALL_PROGRAM_MIN_TINY} def test_minimise_code_and_get_link(): @@ -48,7 +48,7 @@ def test_minimise_code_and_get_link(): json={"code": SMALL_PROGRAM, "lang": "python3", "indentation": " "}, ) assert response.status_code == 200 - assert response.json().code == { + assert response.json() == { "lang": "python3", "code": SMALL_PROGRAM_MIN, "link": "https://pythontutor.com/visualize.html#cumulative=false&heapPrimitives=nevernest&mode=edit&origin=opt-frontend.js&py=311&rawInputLstJSON=%5B%5D&textReferences=false&code=def+main%28%29%3A%0A++++print%28%22hi%22%2B%22bye%22%29%0Amain%28%29", @@ -63,7 +63,7 @@ def test_minimise_code_and_get_link(): }, ) assert response.status_code == 200 - assert response.json().code == { + assert response.json() == { "lang": "python3", "code": SMALL_PROGRAM_MIN_TINY, "link": "https://pythontutor.com/visualize.html#cumulative=false&heapPrimitives=nevernest&mode=edit&origin=opt-frontend.js&py=311&rawInputLstJSON=%5B%5D&textReferences=false&code=def+main%28%29%3A%0A+print%28%22hi%22%2B%22bye%22%29%0Amain%28%29",