From e677167cb45fe4f86321472127dbd95a624d9a47 Mon Sep 17 00:00:00 2001 From: Greg Back Date: Thu, 2 Feb 2017 08:13:48 -0600 Subject: [PATCH] Refine tests. --- stix2/test/test_stix2.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stix2/test/test_stix2.py b/stix2/test/test_stix2.py index 4bca1bb..a748acd 100644 --- a/stix2/test/test_stix2.py +++ b/stix2/test/test_stix2.py @@ -188,6 +188,13 @@ def test_invalid_kwarg_to_indicator(): assert "unexpected keyword arguments: ['my_custom_property']" in str(excinfo) +def test_created_modified_time_are_identical_by_default(): + """By default, the created and modified times should be the same.""" + indicator = stix2.Indicator(**INDICATOR_KWARGS) + + assert indicator.created == indicator.modified + + EXPECTED_MALWARE = """{ "created": "2016-05-12T08:17:27Z", "id": "malware--fedcba98-7654-3210-fedc-ba9876543210", @@ -432,6 +439,7 @@ def test_empty_bundle(): assert bundle.type == "bundle" assert bundle.id.startswith("bundle--") assert bundle.spec_version == "2.0" + assert bundle.objects is None def test_bundle_with_wrong_type():