Skip to content

Commit

Permalink
Sticking to standard indentation in test file
Browse files Browse the repository at this point in the history
  • Loading branch information
sickboyyy committed Feb 8, 2021
1 parent 3a95c34 commit 1afb7be
Showing 1 changed file with 17 additions and 23 deletions.
40 changes: 17 additions & 23 deletions test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@


def run_test(mmr0, rd0, t1win, mmr1, rd1):
response = client.post(
"/mmr/update",
json={
"ratings_list": mmr0,
"rds_list": rd0,
"t1_won": t1win},
)
data = {"ratings_list": mmr0, "rds_list": rd0, "t1_won": t1win}
response = client.post("/mmr/update", json=data)
assert response.status_code == 200

result = response.json()
Expand All @@ -29,27 +24,26 @@ def run_test(mmr0, rd0, t1win, mmr1, rd1):

def test_2x2():
run_test(
[ 1400, 1600, 1340, 1700 ],
[ 350, 350, 350, 350 ],
True,
[1530, 1714, 1203, 1592],
[278, 278, 278, 278]
[1400, 1600, 1340, 1700],
[350, 350, 350, 350],
True,
[1530, 1714, 1203, 1592],
[278, 278, 278, 278]
)


def test_1x1():
run_test(
[ 2000, 1500 ],
[ 90, 350 ],
True,
[2002, 1465],
[90, 318]
[2000, 1500],
[90, 350],
True,
[2002, 1465],
[90, 318]
)
run_test(
[ 2000, 1500 ],
[ 90, 350 ],
False,
[1966, 2021],
[90, 318]
[2000, 1500],
[90, 350],
False,
[1966, 2021],
[90, 318]
)

0 comments on commit 1afb7be

Please sign in to comment.