@@ -95,18 +95,17 @@ async def test_invalid_repository_url(request: pytest.FixtureRequest) -> None:
9595async def test_large_repository (request : pytest .FixtureRequest ) -> None :
9696 """Simulate analysis of a large repository with nested folders."""
9797 client = request .getfixturevalue ("test_client" )
98+ # TODO: ingesting a large repo take too much time (eg: godotengine/godot repository)
9899 form_data = {
99- "input_text" : "https://github.com/large/repo-with-many-files " ,
100- "max_file_size" : "243 " ,
100+ "input_text" : "https://github.com/octocat/hello-world " ,
101+ "max_file_size" : "10 " ,
101102 "pattern_type" : "exclude" ,
102103 "pattern" : "" ,
103104 "token" : "" ,
104105 }
105106
106107 response = client .post ("/api/ingest" , data = form_data )
107- # This might fail with 400 if repo doesn't exist, or succeed with 200
108- _valid = {status .HTTP_200_OK , status .HTTP_400_BAD_REQUEST }
109- assert response .status_code in _valid , f"Request failed: { response .text } "
108+ assert response .status_code == status .HTTP_200_OK , f"Request failed: { response .text } "
110109
111110 response_data = response .json ()
112111 if response .status_code == status .HTTP_200_OK :
@@ -123,15 +122,14 @@ async def test_concurrent_requests(request: pytest.FixtureRequest) -> None:
123122
124123 def make_request () -> None :
125124 form_data = {
126- "input_text" : "https://github.com/octocat/Hello-World " ,
125+ "input_text" : "https://github.com/octocat/hello-world " ,
127126 "max_file_size" : "243" ,
128127 "pattern_type" : "exclude" ,
129128 "pattern" : "" ,
130129 "token" : "" ,
131130 }
132131 response = client .post ("/api/ingest" , data = form_data )
133- _valid = {status .HTTP_200_OK , status .HTTP_400_BAD_REQUEST }
134- assert response .status_code in _valid , f"Request failed: { response .text } "
132+ assert response .status_code == status .HTTP_200_OK , f"Request failed: { response .text } "
135133
136134 response_data = response .json ()
137135 if response .status_code == status .HTTP_200_OK :
@@ -159,8 +157,7 @@ async def test_large_file_handling(request: pytest.FixtureRequest) -> None:
159157 }
160158
161159 response = client .post ("/api/ingest" , data = form_data )
162- _valid = {status .HTTP_200_OK , status .HTTP_400_BAD_REQUEST }
163- assert response .status_code in _valid , f"Request failed: { response .text } "
160+ assert response .status_code == status .HTTP_200_OK , f"Request failed: { response .text } "
164161
165162 response_data = response .json ()
166163 if response .status_code == status .HTTP_200_OK :
@@ -183,8 +180,7 @@ async def test_repository_with_patterns(request: pytest.FixtureRequest) -> None:
183180 }
184181
185182 response = client .post ("/api/ingest" , data = form_data )
186- _valid = {status .HTTP_200_OK , status .HTTP_400_BAD_REQUEST }
187- assert response .status_code in _valid , f"Request failed: { response .text } "
183+ assert response .status_code == status .HTTP_200_OK , f"Request failed: { response .text } "
188184
189185 response_data = response .json ()
190186 if response .status_code == status .HTTP_200_OK :
0 commit comments