Skip to content

Commit 9b21974

Browse files
fix: sonarqube warnings
1 parent 1fa9075 commit 9b21974

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/slackBotFunction/tests/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ def mock_env():
2424
"GUARD_RAIL_VERSION": "1",
2525
"AWS_LAMBDA_FUNCTION_NAME": "test-function",
2626
}
27-
with patch.dict(os.environ, env_vars):
27+
env_vars["AWS_DEFAULT_REGION"] = env_vars["AWS_REGION"]
28+
with patch.dict(os.environ, env_vars, clear=False):
2829
yield env_vars
2930

3031

3132
@pytest.fixture
3233
def mock_dynamodb_table():
3334
"""Mock DynamoDB table"""
3435
with mock_aws():
35-
dynamodb = boto3.resource("dynamodb", region_name="eu-west-2") # noqa: S2622 test setup, ignore sonarqube check
36+
dynamodb = boto3.resource("dynamodb")
3637
table = dynamodb.create_table(
3738
TableName="test-bot-state-table",
3839
KeySchema=[{"AttributeName": "eventId", "KeyType": "HASH"}],

0 commit comments

Comments
 (0)