From 541c682bf626ed268030bfc6781d968678f63073 Mon Sep 17 00:00:00 2001 From: Michael Chisholm Date: Fri, 7 Sep 2018 17:47:24 -0400 Subject: [PATCH] Fixed a test fixture to call the cti-taxii-client Collection constructor correctly. It had been recently changed to address issue #39 in that library. --- stix2/test/test_datastore_taxii.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/stix2/test/test_datastore_taxii.py b/stix2/test/test_datastore_taxii.py index 86cfb6f..89bf949 100644 --- a/stix2/test/test_datastore_taxii.py +++ b/stix2/test/test_datastore_taxii.py @@ -16,8 +16,10 @@ COLLECTION_URL = 'https://example.com/api1/collections/91a7b528-80eb-42ed-a74d-c class MockTAXIICollectionEndpoint(Collection): """Mock for taxii2_client.TAXIIClient""" - def __init__(self, url, **kwargs): - super(MockTAXIICollectionEndpoint, self).__init__(url, **kwargs) + def __init__(self, url, collection_info): + super(MockTAXIICollectionEndpoint, self).__init__( + url, collection_info=collection_info + ) self.objects = [] def add_objects(self, bundle): @@ -68,7 +70,7 @@ class MockTAXIICollectionEndpoint(Collection): @pytest.fixture def collection(stix_objs1): - mock = MockTAXIICollectionEndpoint(COLLECTION_URL, **{ + mock = MockTAXIICollectionEndpoint(COLLECTION_URL, { "id": "91a7b528-80eb-42ed-a74d-c6fbd5a26116", "title": "Writable Collection", "description": "This collection is a dropbox for submitting indicators", @@ -85,7 +87,7 @@ def collection(stix_objs1): @pytest.fixture def collection_no_rw_access(stix_objs1): - mock = MockTAXIICollectionEndpoint(COLLECTION_URL, **{ + mock = MockTAXIICollectionEndpoint(COLLECTION_URL, { "id": "91a7b528-80eb-42ed-a74d-c6fbd5a26116", "title": "Not writeable or readable Collection", "description": "This collection is a dropbox for submitting indicators",