@@ -108,17 +108,17 @@ async def test_category_change_cleans_up_old_attachments_directory(
108108 logger .error (
109109 "ISSUE DETECTED: Was able to retrieve attachment from old category path!"
110110 )
111- assert (
112- False
113- ), "Old category attachment directory still exists and accessible!"
111+ assert False , (
112+ "Old category attachment directory still exists and accessible!"
113+ )
114114 except HTTPStatusError as e :
115115 # This is the expected outcome - old directory should be gone
116116 logger .info (
117117 f"Correctly got error accessing old category path: { e .response .status_code } "
118118 )
119- assert (
120- e .response .status_code == 404
121- ), f"Expected 404, got { e . response . status_code } "
119+ assert e . response . status_code == 404 , (
120+ f"Expected 404, got { e .response .status_code } "
121+ )
122122 logger .info (
123123 "Verified old category attachment directory is not accessible (good!)"
124124 )
@@ -144,18 +144,18 @@ async def test_category_change_cleans_up_old_attachments_directory(
144144 logger .error (
145145 f"Old attachment directory still exists! PROPFIND returned { status } "
146146 )
147- assert (
148- False
149- ), f"Expected old attachment directory to be gone, but it still exists (PROPFIND returned { status } )!"
147+ assert False , (
148+ f"Expected old attachment directory to be gone, but it still exists (PROPFIND returned { status } )!"
149+ )
150150 # If we got another status code (like 404), it's also good - the directory doesn't exist
151151 logger .info (
152152 f"Verified old attachment directory does not exist (PROPFIND returned { status } )"
153153 )
154154 except HTTPStatusError as e :
155155 # 404 is expected - directory should not exist
156- assert (
157- e .response .status_code == 404
158- ), f"Expected PROPFIND to fail with 404, got { e . response . status_code } "
156+ assert e . response . status_code == 404 , (
157+ f"Expected PROPFIND to fail with 404, got { e .response .status_code } "
158+ )
159159 logger .info (
160160 "Verified old attachment directory does not exist via PROPFIND (404 received)"
161161 )
@@ -210,17 +210,17 @@ async def test_category_change_cleans_up_old_attachments_directory(
210210 logger .error (
211211 f"New category attachment directory still exists! PROPFIND returned { status } "
212212 )
213- assert (
214- False
215- ), f"Expected new category attachment directory to be gone, but it still exists (PROPFIND returned { status } )!"
213+ assert False , (
214+ f"Expected new category attachment directory to be gone, but it still exists (PROPFIND returned { status } )!"
215+ )
216216 # If we got another status code (like 404), it's also good - the directory doesn't exist
217217 logger .info (
218218 f"Verified new category attachment directory does not exist (PROPFIND returned { status } )"
219219 )
220220 except HTTPStatusError as e :
221- assert (
222- e .response .status_code == 404
223- ), f"Expected PROPFIND to fail with 404, got { e . response . status_code } "
221+ assert e . response . status_code == 404 , (
222+ f"Expected PROPFIND to fail with 404, got { e .response .status_code } "
223+ )
224224 logger .info (
225225 "Verified new category attachment directory is gone via PROPFIND"
226226 )
@@ -241,17 +241,17 @@ async def test_category_change_cleans_up_old_attachments_directory(
241241 logger .error (
242242 f"Old category attachment directory still exists! PROPFIND returned { status } "
243243 )
244- assert (
245- False
246- ), f"Expected old category attachment directory to be gone, but it still exists (PROPFIND returned { status } )!"
244+ assert False , (
245+ f"Expected old category attachment directory to be gone, but it still exists (PROPFIND returned { status } )!"
246+ )
247247 # If we got another status code (like 404), it's also good - the directory doesn't exist
248248 logger .info (
249249 f"Verified old category attachment directory does not exist (PROPFIND returned { status } )"
250250 )
251251 except HTTPStatusError as e :
252- assert (
253- e .response .status_code == 404
254- ), f"Expected PROPFIND to fail with 404, got { e . response . status_code } "
252+ assert e . response . status_code == 404 , (
253+ f"Expected PROPFIND to fail with 404, got { e .response .status_code } "
254+ )
255255 logger .info (
256256 "Verified old category attachment directory is gone via PROPFIND"
257257 )
0 commit comments