File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
tests/data/serialization/labelbox_v1 Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ def test_text():
1010 serialized = next (LBV1Converter .serialize (collection ))
1111
1212 payload ['media_type' ] = 'text'
13+ payload ['Global Key' ] = None
1314
1415 assert serialized .keys () == payload .keys ()
1516 for key in serialized :
@@ -18,6 +19,8 @@ def test_text():
1819 elif key == 'Label' :
1920 for annotation_a , annotation_b in zip (serialized [key ]['objects' ],
2021 payload [key ]['objects' ]):
22+ annotation_b ['page' ] = None
23+ annotation_b ['unit' ] = None
2124 if not len (annotation_a ['classifications' ]):
2225 # We don't add a classification key to the payload if there is no classifications.
2326 annotation_a .pop ('classifications' )
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ def test_image():
1616
1717 for row in payload :
1818 row ['media_type' ] = 'image'
19+ row ['Global Key' ] = None
1920
2021 collection = LBV1Converter .deserialize (payload )
2122 for idx , serialized in enumerate (LBV1Converter .serialize (collection )):
@@ -30,6 +31,8 @@ def test_image():
3031 if not len (annotation_a ['classifications' ]):
3132 # We don't add a classification key to the payload if there is no classifications.
3233 annotation_a .pop ('classifications' )
34+ annotation_b ['page' ] = None
35+ annotation_b ['unit' ] = None
3336
3437 if isinstance (annotation_b .get ('classifications' ),
3538 list ) and len (
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ def test_video():
1818 collection = LBV1Converter .deserialize ([payload ])
1919 serialized = next (LBV1Converter .serialize (collection ))
2020 payload ['media_type' ] = 'video'
21+ payload ['Global Key' ] = None
2122 assert serialized .keys () == payload .keys ()
2223 for key in serialized :
2324 if key != 'Label' :
@@ -32,6 +33,8 @@ def test_video():
3233
3334 for obj_a , obj_b in zip (annotation_a ['objects' ],
3435 annotation_b ['objects' ]):
36+ obj_b ['page' ] = None
37+ obj_b ['unit' ] = None
3538 obj_a = round_dict (obj_a )
3639 obj_b = round_dict (obj_b )
3740 assert obj_a == obj_b
You can’t perform that action at this time.
0 commit comments