New patch

This commit is contained in:
Gwyn Ciesla 2022-09-12 16:12:10 -05:00
parent 97abd55852
commit 3db21370de

124
2761.patch Normal file
View File

@ -0,0 +1,124 @@
From 01f58a14a7a69a3309480be3f10c16135ec13978 Mon Sep 17 00:00:00 2001
From: Jonas Neubert <jonasneu@amazon.com>
Date: Mon, 12 Sep 2022 14:21:46 -0600
Subject: [PATCH 1/2] add missing `super().tearDown()` for test classes with
custom base classes
---
tests/functional/test_mturk.py | 2 +-
tests/functional/test_sagemaker.py | 1 +
tests/unit/auth/test_signers.py | 4 ++++
tests/unit/test_configloader.py | 1 +
4 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/functional/test_mturk.py b/tests/functional/test_mturk.py
index b30461b2f3..bd4e4267f6 100644
--- a/tests/functional/test_mturk.py
+++ b/tests/functional/test_mturk.py
@@ -23,7 +23,7 @@ def setUp(self):
self.stubber.activate()
def tearDown(self):
- super().setUp()
+ super().tearDown()
self.stubber.deactivate()
def test_list_hits_aliased(self):
diff --git a/tests/functional/test_sagemaker.py b/tests/functional/test_sagemaker.py
index 354d8d2c7e..59a5d61434 100644
--- a/tests/functional/test_sagemaker.py
+++ b/tests/functional/test_sagemaker.py
@@ -15,6 +15,7 @@ def _hook(self, **kwargs):
self.hook_calls.append(kwargs['event_name'])
def tearDown(self):
+ super().tearDown()
self.stubber.deactivate()
def test_event_with_old_prefix(self):
diff --git a/tests/unit/auth/test_signers.py b/tests/unit/auth/test_signers.py
index bfb25e8cf0..880b6bbaaf 100644
--- a/tests/unit/auth/test_signers.py
+++ b/tests/unit/auth/test_signers.py
@@ -716,6 +716,7 @@ def setUp(self):
def tearDown(self):
self.time_patch.stop()
+ super().tearDown()
def test_presign_with_query_string(self):
self.request.url = (
@@ -808,6 +809,7 @@ def setUp(self):
def tearDown(self):
self.datetime_patcher.stop()
+ super().tearDown()
def test_presign_no_params(self):
request = AWSRequest()
@@ -1044,6 +1046,7 @@ def setUp(self):
def tearDown(self):
self.time_patch.stop()
+ super().tearDown()
def test_presign_post(self):
self.auth.add_auth(self.request)
@@ -1110,6 +1113,7 @@ def setUp(self):
def tearDown(self):
self.datetime_patcher.stop()
+ super().tearDown()
def test_presign_post(self):
self.auth.add_auth(self.request)
diff --git a/tests/unit/test_configloader.py b/tests/unit/test_configloader.py
index e8ef97d133..5f3989d0fb 100644
--- a/tests/unit/test_configloader.py
+++ b/tests/unit/test_configloader.py
@@ -39,6 +39,7 @@ def setUp(self):
def tearDown(self):
shutil.rmtree(self.tempdir)
+ super().tearDown()
def create_config_file(self, filename):
contents = (
From 92e28185408db6784518a37f104c9c9690a58b5d Mon Sep 17 00:00:00 2001
From: Jonas Neubert <jonasneu@amazon.com>
Date: Mon, 12 Sep 2022 14:38:07 -0600
Subject: [PATCH 2/2] remove unused base class for TestConfigLoader
---
tests/unit/test_configloader.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/unit/test_configloader.py b/tests/unit/test_configloader.py
index 5f3989d0fb..9f68815f5e 100644
--- a/tests/unit/test_configloader.py
+++ b/tests/unit/test_configloader.py
@@ -23,7 +23,7 @@
multi_file_load_config,
raw_config_parse,
)
-from tests import BaseEnvVar, mock, unittest
+from tests import mock, unittest
def path(filename):
@@ -33,13 +33,12 @@ def path(filename):
return os.path.join(directory, filename)
-class TestConfigLoader(BaseEnvVar):
+class TestConfigLoader(unittest.TestCase):
def setUp(self):
self.tempdir = tempfile.mkdtemp()
def tearDown(self):
shutil.rmtree(self.tempdir)
- super().tearDown()
def create_config_file(self, filename):
contents = (