def add_ttp(self, ttp): """Adds an :class:`.TTP` object to the :attr:`ttps` collection. """ if self.ttps is None: self.ttps = TTPs() self.ttps.append(ttp)
def test_report_with_stix_core_ttps_fails(self): self.assertRaises(TypeError, self.klass().ttps, TTPs(), 'TTPs must be a <class \'stix.report.TTPs\'>, not a <class \'stix.core.ttps.TTPs\'>')
def ttps(self, value): if isinstance(value, TTPs): self._ttps = value else: self._ttps = TTPs(value)