示例#1
0
 def test_et_idref_deprecation(self):
     package = core.STIXPackage()
     package.add(ExploitTarget(idref='test-idref-dep'))
示例#2
0
 def test_campaign_idref_deprecation(self):
     package = core.STIXPackage()
     package.add(Campaign(idref='test-idref-dep'))
示例#3
0
 def test_coa_idref_deprecation(self):
     package = core.STIXPackage()
     package.add(CourseOfAction(idref='test-idref-dep'))
示例#4
0
 def test_deprecated_idref(self):
     p = core.STIXPackage()
     p.idref = "test"
     self.assertEqual(p.idref, "test")
示例#5
0
 def test_deprecated_timestamp(self):
     p = core.STIXPackage()
     ts = now()
     p.timestamp = ts
     self.assertEqual(ts, p.timestamp)
示例#6
0
 def test_related_package_idref_deprecation(self):
     package = core.STIXPackage()
     package.add_related_package(core.STIXPackage(idref='foo'))
示例#7
0
 def test_ttp_idref_deprecation(self):
     package = core.STIXPackage()
     package.add(TTP(idref='test-idref-dep'))
示例#8
0
 def test_ta_idref_deprecation(self):
     package = core.STIXPackage()
     package.add(ThreatActor(idref='test-idref-dep'))
示例#9
0
 def test_indicator_idref_deprecation(self):
     package = core.STIXPackage()
     package.add(Indicator(idref='test-idref-dep'))
 def test_setting_report_ttps_fails_on_stix_package(self):
     self.assertRaises(
         TypeError, core.STIXPackage(), report.TTPs(),
         'TTPs must be a <class \'stix.core.ttps.TTPs\'>, not a <class \'stix.report.TTPs\'>'
     )