1+ from turtle import st
12import uuid
3+
4+ from numpy import empty
25from labelbox .data .annotation_types .annotation import ObjectAnnotation
36
47from labelbox .schema .annotation_import import LabelImport
@@ -55,3 +58,42 @@ def test_export_annotations_nested_checklist(
5558
5659 nested_class_answers = object_annotation .classifications [0 ].value .answer
5760 assert len (nested_class_answers ) == 2
61+
62+
63+ def test_export_filtered_dates (client ,
64+ configured_project_with_complex_ontology ):
65+ project , data_row = configured_project_with_complex_ontology
66+ ontology = project .ontology ().normalized
67+
68+ tool = ontology ["tools" ][0 ]
69+
70+ data = [{
71+ "uuid" : str (uuid .uuid4 ()),
72+ "schemaId" : tool ['featureSchemaId' ],
73+ "dataRow" : {
74+ "id" : data_row .uid
75+ },
76+ "bbox" : {
77+ "top" : 20 ,
78+ "left" : 20 ,
79+ "height" : 50 ,
80+ "width" : 50
81+ }
82+ }]
83+
84+ task = LabelImport .create_from_objects (client , project .uid ,
85+ f'label-import-{ uuid .uuid4 ()} ' , data )
86+ task .wait_until_done ()
87+
88+ regular_export = project .export_labels (download = True )
89+ assert len (regular_export ) == 1
90+
91+ filtered_export = project .export_labels (download = True , start = "2020-01-01" )
92+ assert len (filtered_export ) == 1
93+
94+ empty_export = project .export_labels (download = True ,
95+ start = "2020-01-01" ,
96+ end = "2020-01-02" )
97+ assert len (empty_export ) == 0
98+
99+ # new_export = project.export_labels(start)
0 commit comments