-
Notifications
You must be signed in to change notification settings - Fork 5
/
test.py
46 lines (36 loc) · 1.06 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"""
A file used for local testing.
"""
import json
from typing import Any, Dict
from main import handle_flush_gradescope, handle_form_submit
class MockRequest:
def __init__(self, json: Dict[str, Any]) -> None:
self.json = json
def get_json(self):
return self.json
def test():
# tests = ["regular_dne.json", "partner_dne.json"]
# tests = ["regular_auto.json"]
tests = [
# "student_meeting.json",
# "regular_auto.json",
# "regular_manual.json",
# "partner_auto.json",
# "dsp_auto.json",
# "regular_dne.json",
# "partner_dne.json",
# "retroactive.json",
]
# for test_file in tests:
# print("-" * 100)
# handle_form_submit(MockRequest(json.load(open("test_data/" + test_file))))
handle_flush_gradescope(
MockRequest(
{
"spreadsheet_url": "https://docs.google.com/spreadsheets/d/1U7w4w1C117vbWkF8sjAfoJ8tmCokjtyd2ippMwRPaXs/edit#gid=1603800846"
}
)
)
if __name__ == "__main__":
test()