(self)
| 463 | ) |
| 464 | |
| 465 | def test_add_related_indicator(self): |
| 466 | from stix.indicator import Indicator |
| 467 | from stix.common.related import RelatedIndicator |
| 468 | |
| 469 | i = self.klass() |
| 470 | |
| 471 | self.assertEqual(0, len(i.related_indicators)) |
| 472 | i.add_related_indicator(Indicator()) |
| 473 | self.assertEqual(1, len(i.related_indicators)) |
| 474 | |
| 475 | related = RelatedIndicator(Indicator()) |
| 476 | i.add_related_indicator(related) |
| 477 | self.assertEqual(2, len(i.related_indicators)) |
| 478 | |
| 479 | # Test that this fails |
| 480 | self.assertRaises( |
| 481 | TypeError, |
| 482 | i.add_related_indicator, |
| 483 | "THIS SHOULD FAIL" |
| 484 | ) |
| 485 | |
| 486 | def test_add_description(self): |
| 487 | o1 = self.klass() |
nothing calls this directly
no test coverage detected