aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_secrets_manager.py
diff options
context:
space:
mode:
authordeepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>2024-08-16 20:07:43 +0000
committerGitHub <noreply@github.com>2024-08-16 20:07:43 +0000
commit95ad71be4315f5ae3f9183f66049ae8b8cf914fc (patch)
tree909cf4aa36a6ee568da1cffc55ea260467153bf2 /test/test_secrets_manager.py
parent9dabc89c897f7dc9034e44c277d68e01c7e12ad7 (diff)
downloadde-project-bentley-95ad71be4315f5ae3f9183f66049ae8b8cf914fc.tar.gz
de-project-bentley-95ad71be4315f5ae3f9183f66049ae8b8cf914fc.zip
style: format code with Autopep8, Black and Ruff Formatter
This commit fixes the style issues introduced in 9dabc89 according to the output from Autopep8, Black and Ruff Formatter. Details: https://github.com/ajschofield/de-project-bentley/pull/52
Diffstat (limited to 'test/test_secrets_manager.py')
-rw-r--r--test/test_secrets_manager.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/test/test_secrets_manager.py b/test/test_secrets_manager.py
index 86533bc..cb4ec15 100644
--- a/test/test_secrets_manager.py
+++ b/test/test_secrets_manager.py
@@ -2,10 +2,12 @@ from src.secrets_manager import sm_client, create_secret, list_secret
import boto3
from moto import mock_aws
import json
-import pytest
+import pytest
import os
-pytest.fixture(scope='class')
+pytest.fixture(scope="class")
+
+
def mock_aws_credentials():
"""Mocked AWS Credentials for moto."""
os.environ["AWS_ACCESS_KEY_ID"] = "testing"
@@ -14,10 +16,11 @@ def mock_aws_credentials():
os.environ["AWS_SESSION_TOKEN"] = "testing"
os.environ["AWS_DEFAULT_REGION"] = "eu-west-2"
-@pytest.fixture(scope='class')
+
+@pytest.fixture(scope="class")
def mock_sm_client(mock_aws_credentials):
with mock_aws():
- yield boto3.client('secretsmanager')
+ yield boto3.client("secretsmanager")
def test_create_secret_stores_secrets(mock_sm_client):
@@ -29,6 +32,8 @@ def test_create_secret_stores_secrets(mock_sm_client):
port = "test_port"
secret_name = "test_secret"
- response = create_secret(mock_sm_client, secret_name, cohort_id, user, password, host, database, port)
-
- assert response['Name'] == secret_name \ No newline at end of file
+ response = create_secret(
+ mock_sm_client, secret_name, cohort_id, user, password, host, database, port
+ )
+
+ assert response["Name"] == secret_name
git.ajschof.me — hosted by ajschofield — powered by cgit