MCPcopy Create free account
hub / github.com/STIXProject/python-stix / test_datetime_format

Method test_datetime_format

stix/test/indicator_test.py:453–460  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

451 self.assertEqual(len(i.related_packages), 1)
452
453 def test_datetime_format(self):
454 indicator = Indicator(title="title")
455 valid_time = ValidTime(start_time=datetime.strptime("2010-03-05",
456 "%Y-%m-%d"))
457 indicator.add_valid_time_position(valid_time)
458
459 ixml = indicator.to_xml()
460 self.assertTrue("2010-03-05T" in text_type(ixml))
461
462 def test_observables_property_empty(self):
463 ind = Indicator()

Callers

nothing calls this directly

Calls 4

IndicatorClass · 0.90
ValidTimeClass · 0.90
to_xmlMethod · 0.45

Tested by

no test coverage detected