@@ -212,69 +212,69 @@ async def test_a_get_record(self):
212
212
pytest .assume (res_dict ["record_id" ] == self .record_id )
213
213
# pytest.assume(res_dict["status"] == "ready")
214
214
215
- @pytest .mark .run (order = 34 )
216
- @pytest .mark .asyncio
217
- @pytest .mark .parametrize ("text_splitter" , text_splitter_list )
218
- async def test_a_update_record_by_text (self , text_splitter ):
219
- # Update a record.
220
-
221
- update_record_data = {
222
- "collection_id" : self .collection_id ,
223
- "record_id" : self .record_id ,
224
- "content" : "TaskingAI is an AI-native application development platform that unifies modules like Model, Retrieval, Assistant, and Tool into one seamless ecosystem, streamlining the creation and deployment of applications for developers." ,
225
- "text_splitter" : text_splitter ,
226
- "metadata" : {"test" : "test" },
227
- }
228
- res = await a_update_record (** update_record_data )
229
- logger .info (f"a_update_record:{ res } " )
230
- res_dict = vars (res )
231
- assume_record_result (update_record_data , res_dict )
232
-
233
- @pytest .mark .run (order = 34 )
234
- @pytest .mark .asyncio
235
- @pytest .mark .parametrize ("text_splitter" , text_splitter_list )
236
- async def test_a_update_record_by_web (self , text_splitter ):
237
- # Update a record.
238
-
239
- update_record_data = {
240
- "type" : "web" ,
241
- "title" : "Machine learning" ,
242
- "collection_id" : self .collection_id ,
243
- "record_id" : self .record_id ,
244
- "url" : "https://docs.tasking.ai/docs/guide/getting_started/overview/" ,
245
- "text_splitter" : text_splitter ,
246
- "metadata" : {"test" : "test" },
247
- }
248
- res = await a_update_record (** update_record_data )
249
- logger .info (f"a_update_record:{ res } " )
250
- res_dict = vars (res )
251
- assume_record_result (update_record_data , res_dict )
252
-
253
- @pytest .mark .run (order = 34 )
254
- @pytest .mark .asyncio
255
- @pytest .mark .parametrize ("upload_file_data" , upload_file_data_list [2 :3 ])
256
- async def test_a_update_record_by_file (self , upload_file_data ):
257
- # upload file
258
- upload_file_res = await a_upload_file (** upload_file_data )
259
- upload_file_dict = vars (upload_file_res )
260
- file_id = upload_file_dict ["file_id" ]
261
- pytest .assume (file_id is not None )
262
-
263
- # Update a record.
264
-
265
- update_record_data = {
266
- "type" : "file" ,
267
- "title" : "Machine learning" ,
268
- "collection_id" : self .collection_id ,
269
- "record_id" : self .record_id ,
270
- "file_id" : file_id ,
271
- "text_splitter" : TokenTextSplitter (chunk_size = 200 , chunk_overlap = 100 ),
272
- "metadata" : {"test" : "test" },
273
- }
274
- res = await a_update_record (** update_record_data )
275
- logger .info (f"a_update_record:{ res } " )
276
- res_dict = vars (res )
277
- assume_record_result (update_record_data , res_dict )
215
+ # @pytest.mark.run(order=34)
216
+ # @pytest.mark.asyncio
217
+ # @pytest.mark.parametrize("text_splitter", text_splitter_list)
218
+ # async def test_a_update_record_by_text(self, text_splitter):
219
+ # # Update a record.
220
+ #
221
+ # update_record_data = {
222
+ # "collection_id": self.collection_id,
223
+ # "record_id": self.record_id,
224
+ # "content": "TaskingAI is an AI-native application development platform that unifies modules like Model, Retrieval, Assistant, and Tool into one seamless ecosystem, streamlining the creation and deployment of applications for developers.",
225
+ # "text_splitter": text_splitter,
226
+ # "metadata": {"test": "test"},
227
+ # }
228
+ # res = await a_update_record(**update_record_data)
229
+ # logger.info(f"a_update_record:{res}")
230
+ # res_dict = vars(res)
231
+ # assume_record_result(update_record_data, res_dict)
232
+ #
233
+ # @pytest.mark.run(order=34)
234
+ # @pytest.mark.asyncio
235
+ # @pytest.mark.parametrize("text_splitter", text_splitter_list)
236
+ # async def test_a_update_record_by_web(self, text_splitter):
237
+ # # Update a record.
238
+ #
239
+ # update_record_data = {
240
+ # "type": "web",
241
+ # "title": "Machine learning",
242
+ # "collection_id": self.collection_id,
243
+ # "record_id": self.record_id,
244
+ # "url": "https://docs.tasking.ai/docs/guide/getting_started/overview/",
245
+ # "text_splitter": text_splitter,
246
+ # "metadata": {"test": "test"},
247
+ # }
248
+ # res = await a_update_record(**update_record_data)
249
+ # logger.info(f"a_update_record:{res}")
250
+ # res_dict = vars(res)
251
+ # assume_record_result(update_record_data, res_dict)
252
+ #
253
+ # @pytest.mark.run(order=34)
254
+ # @pytest.mark.asyncio
255
+ # @pytest.mark.parametrize("upload_file_data", upload_file_data_list[2:3])
256
+ # async def test_a_update_record_by_file(self, upload_file_data):
257
+ # # upload file
258
+ # upload_file_res = await a_upload_file(**upload_file_data)
259
+ # upload_file_dict = vars(upload_file_res)
260
+ # file_id = upload_file_dict["file_id"]
261
+ # pytest.assume(file_id is not None)
262
+ #
263
+ # # Update a record.
264
+ #
265
+ # update_record_data = {
266
+ # "type": "file",
267
+ # "title": "Machine learning",
268
+ # "collection_id": self.collection_id,
269
+ # "record_id": self.record_id,
270
+ # "file_id": file_id,
271
+ # "text_splitter": TokenTextSplitter(chunk_size=200, chunk_overlap=100),
272
+ # "metadata": {"test": "test"},
273
+ # }
274
+ # res = await a_update_record(**update_record_data)
275
+ # logger.info(f"a_update_record:{res}")
276
+ # res_dict = vars(res)
277
+ # assume_record_result(update_record_data, res_dict)
278
278
279
279
@pytest .mark .run (order = 79 )
280
280
@pytest .mark .asyncio
0 commit comments