Skip to content

Commit 1279862

Browse files
committed
Fix tests for test_add_related_indicator/observable TypeErrors
1 parent 1909bf1 commit 1279862

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

stix/indicator/indicator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ class Indicator(stix.BaseCoreComponent):
177177
_ALL_VERSIONS = ("2.0", "2.0.1", "2.1", "2.1.1", "2.2")
178178
_ALLOWED_COMPOSITION_OPERATORS = ('AND', 'OR')
179179
_ID_PREFIX = "indicator"
180+
_try_cast = False
180181

181182
producer = fields.TypedField("Producer", InformationSource)
182183
observable = fields.TypedField("Observable", Observable, postset_hook=lambda inst,value: inst.set_observables([value]))

stix/test/incident_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def test_add_related_observable(self):
516516

517517
# Test that this fails
518518
self.assertRaises(
519-
ValueError,
519+
TypeError,
520520
i.add_related_observable,
521521
"THIS SHOULD FAIL"
522522
)

0 commit comments

Comments
 (0)