@@ -177,50 +177,51 @@ async def test__get_current_officers_admin(admin_client):
177177 assert len (curr_officers ) == 3
178178 assert curr_officers ["executive at large" ]["computing_id" ] is not None
179179
180- async def test__get_all_officers_admin (client ):
181- response = await client .get ("/officers/all?include_future_terms=true" )
180+ async def test__get_all_officers_admin (admin_client ):
181+ response = await admin_client .get ("/officers/all?include_future_terms=true" )
182182 assert response .status_code == 200
183183 assert len (response .json ()) == 9
184184 assert response .json ()[1 ]["phone_number" ] == "1234567890"
185185
186- response = await client .get (f"/officers/terms/{ load_test_db .SYSADMIN_COMPUTING_ID } ?include_future_terms=false" )
186+ async def test__get_officer_term (admin_client ):
187+ response = await admin_client .get (f"/officers/terms/{ load_test_db .SYSADMIN_COMPUTING_ID } ?include_future_terms=false" )
187188 assert response .status_code == 200
188189 assert response .json () != []
189190 assert len (response .json ()) == 2
190191
191- response = await client .get (f"/officers/terms/{ load_test_db .SYSADMIN_COMPUTING_ID } ?include_future_terms=true" )
192+ response = await admin_client .get (f"/officers/terms/{ load_test_db .SYSADMIN_COMPUTING_ID } ?include_future_terms=true" )
192193 assert response .status_code == 200
193194 assert response .json () != []
194195 assert len (response .json ()) == 3
195196
196- response = await client .get ("/officers/info/abc11" )
197+ response = await admin_client .get ("/officers/info/abc11" )
197198 assert response .status_code == 200
198199 assert response .json () != {}
199200 assert response .json ()["legal_name" ] == "Person A"
200- response = await client .get (f"/officers/info/{ load_test_db .SYSADMIN_COMPUTING_ID } " )
201+ response = await admin_client .get (f"/officers/info/{ load_test_db .SYSADMIN_COMPUTING_ID } " )
201202 assert response .status_code == 200
202203 assert response .json () != {}
203- response = await client .get ("/officers/info/balargho" )
204+ response = await admin_client .get ("/officers/info/balargho" )
204205 assert response .status_code == 404
205206
206- response = await client .get ("/officers/terms/ehbc12?include_future_terms=true" )
207+ response = await admin_client .get ("/officers/terms/ehbc12?include_future_terms=true" )
207208 assert response .status_code == 200
208209 assert response .json () == []
209210
210- response = await client .post ("officers/term" , content = json .dumps ([{
211+ response = await admin_client .post ("officers/term" , content = json .dumps ([{
211212 "computing_id" : "ehbc12" ,
212213 "position" : OfficerPositionEnum .DIRECTOR_OF_MULTIMEDIA ,
213214 "start_date" : "2025-12-29" ,
214215 "legal_name" : "Eh Bc"
215216 }]))
216217 assert response .status_code == 200
217218
218- response = await client .get ("/officers/terms/ehbc12?include_future_terms=true" )
219+ response = await admin_client .get ("/officers/terms/ehbc12?include_future_terms=true" )
219220 assert response .status_code == 200
220221 assert response .json () != []
221222 assert len (response .json ()) == 1
222223
223- response = await client .patch ("officers/info/abc11" , content = json .dumps ({
224+ response = await admin_client .patch ("officers/info/abc11" , content = json .dumps ({
224225 "legal_name" : "Person A2" ,
225226 "phone_number" : "12345asdab67890" ,
226227 "discord_name" : "person_a_yeah" ,
@@ -235,7 +236,7 @@ async def test__get_all_officers_admin(client):
235236 assert resJson ["github_username" ] == "person_a"
236237 assert resJson [
"google_drive_email" ]
== "[email protected] " 237238
238- response = await client .patch ("officers/info/aaabbbc" , content = json .dumps ({
239+ response = await admin_client .patch ("officers/info/aaabbbc" , content = json .dumps ({
239240 "legal_name" : "Person AABBCC" ,
240241 "phone_number" : "1234567890" ,
241242 "discord_name" : None ,
@@ -244,7 +245,7 @@ async def test__get_all_officers_admin(client):
244245 }))
245246 assert response .status_code == 404
246247
247- response = await client .patch ("officers/term/1" , content = json .dumps ({
248+ response = await admin_client .patch ("officers/term/1" , content = json .dumps ({
248249 "position" : OfficerPositionEnum .TREASURER ,
249250 "start_date" : (date .today () - timedelta (days = 365 )).isoformat (),
250251 "end_date" : (date .today () - timedelta (days = 1 )).isoformat (),
@@ -257,7 +258,7 @@ async def test__get_all_officers_admin(client):
257258 }))
258259 assert response .status_code == 200
259260
260- response = await client .get ("/officers/terms/abc11?include_future_terms=true" )
261+ response = await admin_client .get ("/officers/terms/abc11?include_future_terms=true" )
261262 assert response .status_code == 200
262263 resJson = response .json ()
263264 assert resJson [1 ]["position" ] == OfficerPositionEnum .TREASURER
@@ -274,13 +275,13 @@ async def test__get_all_officers_admin(client):
274275 all_terms = await all_officers (db_session , include_future_terms = True )
275276 assert len (all_terms ) == 10
276277
277- response = await client .delete ("officers/term/1" )
278+ response = await admin_client .delete ("officers/term/1" )
278279 assert response .status_code == 200
279- response = await client .delete ("officers/term/2" )
280+ response = await admin_client .delete ("officers/term/2" )
280281 assert response .status_code == 200
281- response = await client .delete ("officers/term/3" )
282+ response = await admin_client .delete ("officers/term/3" )
282283 assert response .status_code == 200
283- response = await client .delete ("officers/term/4" )
284+ response = await admin_client .delete ("officers/term/4" )
284285 assert response .status_code == 200
285286
286287 async with database_setup .session () as db_session :
0 commit comments