From 6bd797e2582143906e10ba359cf8ea8a188ed9fd Mon Sep 17 00:00:00 2001 From: Emmanuelle Vargas-Gonzalez Date: Tue, 10 Jul 2018 16:19:40 -0400 Subject: [PATCH] Fix 'test_memory_store_object_with_custom_property_in_bundle' Since Bundles objects are now added instead of the Bundle itself, it now works as intended. --- stix2/test/v20/test_datastore_memory.py | 3 +-- stix2/test/v21/test_datastore_memory.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/stix2/test/v20/test_datastore_memory.py b/stix2/test/v20/test_datastore_memory.py index 2cb0a1c..1863aa4 100644 --- a/stix2/test/v20/test_datastore_memory.py +++ b/stix2/test/v20/test_datastore_memory.py @@ -248,8 +248,7 @@ def test_memory_store_object_with_custom_property_in_bundle(mem_store): bundle = Bundle(camp, allow_custom=True) mem_store.add(bundle) - bundle_r = mem_store.get(bundle.id) - camp_r = bundle_r['objects'][0] + camp_r = mem_store.get(camp.id) assert camp_r.id == camp.id assert camp_r.x_empire == camp.x_empire diff --git a/stix2/test/v21/test_datastore_memory.py b/stix2/test/v21/test_datastore_memory.py index 56eea14..74dac2e 100644 --- a/stix2/test/v21/test_datastore_memory.py +++ b/stix2/test/v21/test_datastore_memory.py @@ -256,8 +256,7 @@ def test_memory_store_object_with_custom_property_in_bundle(mem_store): bundle = Bundle(camp, allow_custom=True) mem_store.add(bundle) - bundle_r = mem_store.get(bundle.id) - camp_r = bundle_r['objects'][0] + camp_r = mem_store.get(camp.id) assert camp_r.id == camp.id assert camp_r.x_empire == camp.x_empire