Skip to content

Commit 6303682

Browse files
committed
Updated Tests
1 parent 5055ce5 commit 6303682

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
lines changed

tests/test_departments.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,52 @@ def test_departments_route(test_client: FlaskClient) -> None:
3737
"space, the final frontier",
3838
"flying, need for speed",
3939
),
40+
(
41+
"School of science",
42+
"School of science",
43+
"School of engineering",
44+
"School of science",
45+
"School of engineering",
46+
"School of engineering",
47+
"School of engineering",
48+
),
49+
(
50+
"CSCI",
51+
"BIOL",
52+
"MTLE"
53+
"MATH",
54+
"ENVI",
55+
"MANE",
56+
"MANE",
57+
),
58+
(
59+
"https://cdn-icons-png.flaticon.com/512/5310/5310672.png",
60+
"https://cdn-icons-png.flaticon.com/512/5310/5310672.png",
61+
"https://cdn-icons-png.flaticon.com/512/5310/5310672.png"
62+
"https://cdn-icons-png.flaticon.com/512/5310/5310672.png",
63+
"https://cdn-icons-png.flaticon.com/512/5310/5310672.png",
64+
"https://cdn-icons-png.flaticon.com/512/5310/5310672.png",
65+
"https://cdn-icons-png.flaticon.com/512/5310/5310672.png",
66+
),
67+
(
68+
"https://www.rpi.edu",
69+
"https://www.rpi.edu",
70+
"https://www.rpi.edu",
71+
"https://www.rpi.edu",
72+
"https://www.rpi.edu",
73+
"https://www.rpi.edu",
74+
"https://www.rpi.edu",
75+
),
4076
)
4177

4278
for department in json_data:
4379
assert department["name"] in rpi_departments_data[0]
4480
assert department["description"] in rpi_departments_data[1]
81+
#Added
82+
assert department["school_id"] in rpi_departments_data[2]
83+
assert department["id"] in rpi_departments_data[3]
84+
assert department["image"] in rpi_departments_data[4]
85+
assert department["webcite"] in rpi_departments_data[5]
4586

4687

4788
def test_department_route(test_client: FlaskClient) -> None:
@@ -59,6 +100,10 @@ def test_department_route(test_client: FlaskClient) -> None:
59100
assert json_data["name"] == "Computer Science"
60101
assert json_data["description"] == "DS"
61102
assert json_data["school_id"] == "School of Science"
103+
#Added
104+
assert json_data["id"] == "CSCI"
105+
assert json_data["image"] == "https://cdn-icons-png.flaticon.com/512/5310/5310672.png"
106+
assert json_data["webcite"] == "https://www.rpi.edu"
62107

63108
prof_names = ["Duy Le", "Rafael", "Turner", "Kuzmin", "Goldschmidt"]
64109
prof_rcs_ids = ["led", "cenzar", "turner", "kuzmin", "goldd"]

tests/test_lab_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def test_lab_manager_route_with_input_id(test_client: FlaskClient) -> None:
2525
"alt_email": None,
2626
"phone_number": None,
2727
"email": None,
28+
"description": None,
2829
}
2930

3031
assert json_data == cenzar_data

tests/test_user.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,17 @@ def test_user_route_with_input_id_1(test_client: FlaskClient) -> None:
2020

2121
assert json_data["id"] == 1
2222
assert json_data["first_name"] == "Rafael"
23-
assert json_data["last_name"] == "Cenzano"
2423
assert json_data["preferred_name"] == "Raf"
24+
assert json_data["last_name"] == "Cenzano"
2525
assert json_data["email"] == "[email protected]"
26+
#Added
27+
assert json_data["description"] == "labconnect is the best RCOS project"
28+
assert json_data["profile_picture"] == "https://rafael.sirv.com/Images/rafael.jpeg?thumbnail=350&format=webp&q=90"
29+
assert json_data["website"] == "https://rafaelcenzano.com"
30+
#class year
31+
assert json_data["class_year"] == "2025"
32+
#lab manager id
33+
assert json_data["lab_manager_id"] == 1
2634

2735
departments_data = [
2836
{"user_id": 1, "department_id": "Computer Science"},
@@ -104,6 +112,12 @@ def test_user_route_with_input_id_2(test_client: FlaskClient) -> None:
104112
assert json_data["last_name"] == "RCOS"
105113
assert json_data["preferred_name"] is None
106114
assert json_data["email"] == "[email protected]"
115+
#Added
116+
assert json_data["description"] is None
117+
assert json_data["profile_picture"] == "https://www.svgrepo.com/show/206842/professor.svg" # Adjust based on your test data
118+
assert json_data["website"] is None
119+
assert json_data["class_year"] is None
120+
assert json_data["lab_manager_id"] is None
107121

108122
departments_data = [
109123
{"department_id": "Computer Science", "user_id": 2},

0 commit comments

Comments
 (0)