From d62f5ee1419888fb1dee4d2381634266e73f313c Mon Sep 17 00:00:00 2001 From: Chris Lenk Date: Thu, 18 Jun 2020 11:36:18 -0400 Subject: [PATCH] Remove 'encoding' param from json.loads It's ignored since Python 3.1 and we've dropped 2.7. --- stix2/test/v20/test_datastore_taxii.py | 2 +- stix2/test/v21/test_datastore_taxii.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stix2/test/v20/test_datastore_taxii.py b/stix2/test/v20/test_datastore_taxii.py index b0c6b77..0b21981 100644 --- a/stix2/test/v20/test_datastore_taxii.py +++ b/stix2/test/v20/test_datastore_taxii.py @@ -28,7 +28,7 @@ class MockTAXIICollectionEndpoint(Collection): def add_objects(self, bundle): self._verify_can_write() if isinstance(bundle, six.string_types): - bundle = json.loads(bundle, encoding='utf-8') + bundle = json.loads(bundle) for object in bundle.get("objects", []): self.objects.append(object) self.manifests.append( diff --git a/stix2/test/v21/test_datastore_taxii.py b/stix2/test/v21/test_datastore_taxii.py index 28a7368..92ae6dc 100644 --- a/stix2/test/v21/test_datastore_taxii.py +++ b/stix2/test/v21/test_datastore_taxii.py @@ -28,7 +28,7 @@ class MockTAXIICollectionEndpoint(Collection): def add_objects(self, bundle): self._verify_can_write() if isinstance(bundle, six.string_types): - bundle = json.loads(bundle, encoding='utf-8') + bundle = json.loads(bundle) for object in bundle.get("objects", []): self.objects.append(object) self.manifests.append(