@@ -75,7 +75,7 @@ def test_ingest_text_document(self, client):
7575 "title" : "Test Document" ,
7676 "text" : "This is a test document about machine learning and neural networks." ,
7777 })
78- assert resp .status_code in (200 , 400 , 500 )
78+ assert resp .status_code in (200 , 400 , 500 , 503 )
7979
8080 def test_ingest_then_list (self , client ):
8181 # Ingest
@@ -97,7 +97,7 @@ def test_ingest_minimal_payload(self, client):
9797 "doc_id" : "minimal-doc" ,
9898 "text" : "minimal content" ,
9999 })
100- assert resp .status_code in (200 , 400 , 500 )
100+ assert resp .status_code in (200 , 400 , 500 , 503 )
101101
102102
103103class TestRAGUpload :
@@ -108,14 +108,14 @@ def test_upload_text_file(self, client):
108108 resp = client .post ("/api/rag/upload" , files = {
109109 "file" : ("paper.txt" , io .BytesIO (content .encode ()), "text/plain" ),
110110 })
111- assert resp .status_code in (200 , 400 , 500 )
111+ assert resp .status_code in (200 , 400 , 500 , 503 )
112112
113113 def test_upload_markdown_file (self , client ):
114114 content = "# Abstract\n \n We propose a novel approach to few-shot learning.\n \n ## Introduction"
115115 resp = client .post ("/api/rag/upload" , files = {
116116 "file" : ("paper.md" , io .BytesIO (content .encode ()), "text/markdown" ),
117117 })
118- assert resp .status_code in (200 , 400 , 500 )
118+ assert resp .status_code in (200 , 400 , 500 , 503 )
119119
120120 def test_upload_then_list (self , client ):
121121 content = "This document covers vector databases and semantic search."
@@ -145,11 +145,11 @@ def test_delete_ingested_document(self, client):
145145 "text" : "This document will be deleted." ,
146146 })
147147 resp = client .delete ("/api/rag/documents/to-delete-001" )
148- assert resp .status_code in (200 , 404 )
148+ assert resp .status_code in (200 , 404 , 503 )
149149
150150 def test_delete_nonexistent_document (self , client ):
151151 resp = client .delete ("/api/rag/documents/nonexistent-doc-xxxxx" )
152- assert resp .status_code in (200 , 404 )
152+ assert resp .status_code in (200 , 404 , 503 )
153153
154154 def test_delete_then_list_does_not_contain (self , client ):
155155 client .post ("/api/rag/ingest" , json = {
0 commit comments