File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,23 @@ def test_apply_bitfields(plain_item: Item) -> None:
162162 )
163163
164164
165+ @pytest .mark .vcr ()
166+ def test_apply_classes (plain_item : Item ) -> None :
167+ ClassificationExtension .add_to (plain_item )
168+ ClassificationExtension .ext (plain_item ).apply (
169+ classes = [
170+ Classification .create (name = "no" , value = 0 ),
171+ Classification .create (name = "yes" , value = 1 ),
172+ ]
173+ )
174+ plain_item .validate ()
175+ assert (
176+ ClassificationExtension .ext (plain_item ).classes is not None
177+ and len (cast (list [Classification ], ClassificationExtension .ext (plain_item ).classes ))
178+ == 2
179+ )
180+
181+
165182def test_create_classes (plain_item : Item ) -> None :
166183 ClassificationExtension .add_to (plain_item )
167184 ext = ClassificationExtension .ext (plain_item )
You can’t perform that action at this time.
0 commit comments