File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
tests/unit/serve/runtimes Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -655,6 +655,7 @@ Jina is released on every Friday evening. The PyPi package and Docker Image will
655
655
- [Release Note (`3.23.0`)](#release-note-3230)
656
656
- [Release Note (`3.23.1`)](#release-note-3231)
657
657
- [Release Note (`3.23.2`)](#release-note-3232)
658
+ - [Release Note (`3.23.3`)](#release-note-3233)
658
659
659
660
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
660
661
Original file line number Diff line number Diff line change @@ -382,3 +382,28 @@ class SearchResult(BaseDoc):
382
382
reconstructed_in_gateway_from_Search_results = QuoteFile_reconstructed_in_gateway_from_Search_results (
383
383
texts = textlist )
384
384
assert reconstructed_in_gateway_from_Search_results .texts [0 ].text == 'hey'
385
+
386
+
387
+ @pytest .mark .skipif (not docarray_v2 , reason = 'Test only working with docarray v2' )
388
+ def test_create_aux_model_with_multiple_doclists_of_same_type ():
389
+ from docarray import DocList , BaseDoc
390
+ from jina .serve .runtimes .helper import _create_aux_model_doc_list_to_list
391
+
392
+ class MyTextDoc (BaseDoc ):
393
+ text : str
394
+
395
+ class QuoteFile (BaseDoc ):
396
+ texts : DocList [MyTextDoc ]
397
+
398
+ class QuoteFileType (BaseDoc ):
399
+ """
400
+ QuoteFileType class.
401
+ """
402
+ id : str = None # same as name, compatibility reasons for a generic, shared `id` field
403
+ name : str = None
404
+ total_count : int = None
405
+ docs : DocList [QuoteFile ] = None
406
+ chunks : DocList [QuoteFile ] = None
407
+
408
+ new_model = _create_aux_model_doc_list_to_list (QuoteFileType )
409
+ new_model .schema ()
You can’t perform that action at this time.
0 commit comments