@@ -10,15 +10,15 @@ def test_split_bundle():
1010 stix_splitter = OpenCTIStix2Splitter ()
1111 with open ("./tests/data/enterprise-attack.json" ) as file :
1212 content = file .read ()
13- expectations , bundles = stix_splitter .split_bundle_with_expectations (content )
13+ expectations , _ , bundles = stix_splitter .split_bundle_with_expectations (content )
1414 assert expectations == 7016
1515
1616
1717def test_split_test_bundle ():
1818 stix_splitter = OpenCTIStix2Splitter ()
1919 with open ("./tests/data/DATA-TEST-STIX2_v2.json" ) as file :
2020 content = file .read ()
21- expectations , bundles = stix_splitter .split_bundle_with_expectations (content )
21+ expectations , _ , bundles = stix_splitter .split_bundle_with_expectations (content )
2222 assert expectations == 59
2323 base_bundles = json .loads (content )["objects" ]
2424 for base in base_bundles :
@@ -40,13 +40,13 @@ def test_split_mono_entity_bundle():
4040 stix_splitter = OpenCTIStix2Splitter ()
4141 with open ("./tests/data/mono-bundle-entity.json" ) as file :
4242 content = file .read ()
43- expectations , bundles = stix_splitter .split_bundle_with_expectations (content )
43+ expectations , _ , bundles = stix_splitter .split_bundle_with_expectations (content )
4444 assert expectations == 1
4545 json_bundle = json .loads (bundles [0 ])["objects" ][0 ]
4646 assert json_bundle ["created_by_ref" ] == "fa42a846-8d90-4e51-bc29-71d5b4802168"
4747 # Split with cleanup_inconsistent_bundle
4848 stix_splitter = OpenCTIStix2Splitter ()
49- expectations , bundles = stix_splitter .split_bundle_with_expectations (
49+ expectations , _ , bundles = stix_splitter .split_bundle_with_expectations (
5050 bundle = content , cleanup_inconsistent_bundle = True
5151 )
5252 assert expectations == 1
@@ -58,11 +58,11 @@ def test_split_mono_relationship_bundle():
5858 stix_splitter = OpenCTIStix2Splitter ()
5959 with open ("./tests/data/mono-bundle-relationship.json" ) as file :
6060 content = file .read ()
61- expectations , bundles = stix_splitter .split_bundle_with_expectations (content )
61+ expectations , _ , bundles = stix_splitter .split_bundle_with_expectations (content )
6262 assert expectations == 1
6363 # Split with cleanup_inconsistent_bundle
6464 stix_splitter = OpenCTIStix2Splitter ()
65- expectations , bundles = stix_splitter .split_bundle_with_expectations (
65+ expectations , _ , bundles = stix_splitter .split_bundle_with_expectations (
6666 bundle = content , cleanup_inconsistent_bundle = True
6767 )
6868 assert expectations == 0
@@ -72,19 +72,19 @@ def test_split_capec_bundle():
7272 stix_splitter = OpenCTIStix2Splitter ()
7373 with open ("./tests/data/mitre_att_capec.json" ) as file :
7474 content = file .read ()
75- expectations , bundles = stix_splitter .split_bundle_with_expectations (content )
75+ expectations , _ , bundles = stix_splitter .split_bundle_with_expectations (content )
7676 assert expectations == 2610
7777
7878
7979def test_split_internal_ids_bundle ():
8080 stix_splitter = OpenCTIStix2Splitter ()
8181 with open ("./tests/data/bundle_with_internal_ids.json" ) as file :
8282 content = file .read ()
83- expectations , bundles = stix_splitter .split_bundle_with_expectations (content )
83+ expectations , _ , bundles = stix_splitter .split_bundle_with_expectations (content )
8484 assert expectations == 4
8585 # Split with cleanup_inconsistent_bundle
8686 stix_splitter = OpenCTIStix2Splitter ()
87- expectations , bundles = stix_splitter .split_bundle_with_expectations (
87+ expectations , _ , bundles = stix_splitter .split_bundle_with_expectations (
8888 bundle = content , cleanup_inconsistent_bundle = True
8989 )
9090 assert expectations == 4
@@ -101,11 +101,11 @@ def test_split_missing_refs_bundle():
101101 stix_splitter = OpenCTIStix2Splitter ()
102102 with open ("./tests/data/missing_refs.json" ) as file :
103103 content = file .read ()
104- expectations , bundles = stix_splitter .split_bundle_with_expectations (content )
104+ expectations , _ , bundles = stix_splitter .split_bundle_with_expectations (content )
105105 assert expectations == 4
106106 # Split with cleanup_inconsistent_bundle
107107 stix_splitter = OpenCTIStix2Splitter ()
108- expectations , bundles = stix_splitter .split_bundle_with_expectations (
108+ expectations , _ , bundles = stix_splitter .split_bundle_with_expectations (
109109 bundle = content , cleanup_inconsistent_bundle = True
110110 )
111111 assert expectations == 3
@@ -115,7 +115,7 @@ def test_split_cyclic_bundle():
115115 stix_splitter = OpenCTIStix2Splitter ()
116116 with open ("./tests/data/cyclic-bundle.json" ) as file :
117117 content = file .read ()
118- expectations , bundles = stix_splitter .split_bundle_with_expectations (content )
118+ expectations , _ , bundles = stix_splitter .split_bundle_with_expectations (content )
119119 assert expectations == 6
120120 for bundle in bundles :
121121 json_bundle = json .loads (bundle )
0 commit comments