From f896920468770f3407a3035b9c8e04902578d556 Mon Sep 17 00:00:00 2001 From: Sanath Kumar Ramesh Date: Mon, 16 Sep 2019 15:07:44 -0700 Subject: [PATCH] chore: black format tests (#1415) --- tests/integration/buildcmd/build_integ_base.py | 2 +- tests/integration/deprecation/test_deprecation_warning.py | 2 +- .../local/start_lambda/start_lambda_api_integ_base.py | 4 +--- tests/integration/local/start_lambda/test_start_lambda.py | 1 + 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/integration/buildcmd/build_integ_base.py b/tests/integration/buildcmd/build_integ_base.py index 2804986e1d..8b69f94726 100644 --- a/tests/integration/buildcmd/build_integ_base.py +++ b/tests/integration/buildcmd/build_integ_base.py @@ -36,7 +36,7 @@ def setUp(self): # location that is shared in Docker. Most temp directories are not shared. Therefore we are # using a scratch space within the test folder that is .gitignored. Contents of this folder # is also deleted after every test run - self.scratch_dir = str(Path(__file__).resolve().parent.joinpath(str(uuid.uuid4()).replace('-', '')[:10])) + self.scratch_dir = str(Path(__file__).resolve().parent.joinpath(str(uuid.uuid4()).replace("-", "")[:10])) shutil.rmtree(self.scratch_dir, ignore_errors=True) os.mkdir(self.scratch_dir) diff --git a/tests/integration/deprecation/test_deprecation_warning.py b/tests/integration/deprecation/test_deprecation_warning.py index 15204f6aac..d4ea9e8c56 100644 --- a/tests/integration/deprecation/test_deprecation_warning.py +++ b/tests/integration/deprecation/test_deprecation_warning.py @@ -26,7 +26,7 @@ def test_print_deprecation_warning_if_py2(self): process = self.run_cmd() (stdoutdata, stderrdata) = process.communicate() - expected_notice = re.sub(r'\n', os.linesep, DEPRECATION_NOTICE) + expected_notice = re.sub(r"\n", os.linesep, DEPRECATION_NOTICE) # Deprecation notice should be part of the command output if running in python 2 if sys.version_info.major == 2: self.assertIn(expected_notice, stderrdata.decode()) diff --git a/tests/integration/local/start_lambda/start_lambda_api_integ_base.py b/tests/integration/local/start_lambda/start_lambda_api_integ_base.py index c05ac04b70..7fd5099f0a 100644 --- a/tests/integration/local/start_lambda/start_lambda_api_integ_base.py +++ b/tests/integration/local/start_lambda/start_lambda_api_integ_base.py @@ -33,9 +33,7 @@ def start_lambda(cls): if os.getenv("SAM_CLI_DEV"): command = "samdev" - cls.start_lambda_process = Popen( - [command, "local", "start-lambda", "-t", cls.template, "-p", cls.port] - ) + cls.start_lambda_process = Popen([command, "local", "start-lambda", "-t", cls.template, "-p", cls.port]) # we need to wait some time for start-lambda to start, hence the sleep time.sleep(5) diff --git a/tests/integration/local/start_lambda/test_start_lambda.py b/tests/integration/local/start_lambda/test_start_lambda.py index 3401c09774..daae71ffd6 100644 --- a/tests/integration/local/start_lambda/test_start_lambda.py +++ b/tests/integration/local/start_lambda/test_start_lambda.py @@ -46,6 +46,7 @@ def test_same_endpoint(self): for result in results: self.assertEqual(result.get("Payload").read().decode("utf-8"), '"Slept for 10s"') + class TestLambdaServiceErrorCases(StartLambdaIntegBaseClass): template_path = "/testdata/invoke/template.yml"