File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
surfsense_backend/tests/integration/document_upload Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ async def _cleanup_documents(
183183 for doc_id in cleanup_doc_ids :
184184 try :
185185 resp = await delete_document (client , headers , doc_id )
186- if resp .status_code == 409 :
186+ if resp .status_code != 200 :
187187 remaining_ids .append (doc_id )
188188 except Exception :
189189 remaining_ids .append (doc_id )
@@ -274,6 +274,15 @@ def _mock_external_apis(monkeypatch):
274274 )
275275
276276
277+ @pytest .fixture (autouse = True )
278+ def _mock_celery_delete_task (monkeypatch ):
279+ """Mock Celery delete dispatch — no broker is available in CI."""
280+ monkeypatch .setattr (
281+ "app.tasks.celery_tasks.document_tasks.delete_document_task.delay" ,
282+ lambda * args , ** kwargs : None ,
283+ )
284+
285+
277286@pytest .fixture (autouse = True )
278287def _mock_redis_heartbeat (monkeypatch ):
279288 """Mock Redis heartbeat — Redis is an external infrastructure boundary."""
You can’t perform that action at this time.
0 commit comments