Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbonothing64 committed Dec 11, 2023
1 parent 90fc925 commit d5f51a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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",
Expand All @@ -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",
Expand Down

1 comment on commit d5f51a6

@vercel
Copy link

@vercel vercel bot commented on d5f51a6 Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.