Skip to content

Commit 144db7c

Browse files
committed
Updated Python dependencies and fixed issues with moto v5
1 parent 072bbc4 commit 144db7c

File tree

7 files changed

+1255
-379
lines changed

7 files changed

+1255
-379
lines changed

unicorn_contracts/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ define ddb_delete
9898
endef
9999

100100
define mcurl
101-
curl -X $(1) -H "Content-type: application/json" -d @$(call payload,$(2)) $(apiUrl)contract
101+
curl -X $(1) -H "Content-type: application/json" -d @$(call payload,$(2)) $(apiUrl)contracts
102102
endef
103103

104104
define get_ddb_key

unicorn_contracts/poetry.lock

Lines changed: 1041 additions & 183 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unicorn_contracts/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ aws-xray-sdk = "^2.14.0"
1414
[tool.poetry.group.dev.dependencies]
1515
pytest = "^8.2.0"
1616
requests = "^2.31.0"
17-
moto = "^5.0.6"
17+
moto = {version = "^5.0.6", extras = ["dynamodb", "events", "sqs"]}
1818
importlib-metadata = "^7.1.0"
1919
pyyaml = "^6.0.1"
2020
arnparse = "^0.0.2"
2121
aws-lambda-powertools = {extras = ["aws-sdk"], version = "^2.41.0"}
22+
poetry-plugin-export = "^1.8.0"
2223

2324
[build-system]
2425
requires = ["poetry-core>=1.0.0"]

unicorn_contracts/tests/unit/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from aws_lambda_powertools.utilities.typing import LambdaContext
77

88
import pytest
9-
from moto import mock_dynamodb, mock_events, mock_sqs
9+
from moto import mock_aws
1010

1111

1212
@pytest.fixture(scope='function')
@@ -20,19 +20,19 @@ def aws_credentials():
2020

2121
@pytest.fixture(scope='function')
2222
def dynamodb(aws_credentials):
23-
with mock_dynamodb():
23+
with mock_aws():
2424
yield boto3.resource('dynamodb', region_name='ap-southeast-2')
2525

2626

2727
@pytest.fixture(scope='function')
2828
def eventbridge(aws_credentials):
29-
with mock_events():
29+
with mock_aws():
3030
yield boto3.client('events', region_name='ap-southeast-2')
3131

3232

3333
@pytest.fixture(scope='function')
3434
def sqs(aws_credentials):
35-
with mock_sqs():
35+
with mock_aws():
3636
yield boto3.client('sqs', region_name='ap-southeast-2')
3737

3838

unicorn_properties/poetry.lock

Lines changed: 199 additions & 182 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unicorn_properties/tests/unit/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from aws_lambda_powertools.utilities.typing import LambdaContext
88

99
import pytest
10-
from moto import mock_dynamodb, mock_events, mock_stepfunctions
10+
from moto import mock_aws
1111

1212

1313
@pytest.fixture(scope='function')
@@ -21,19 +21,19 @@ def aws_credentials():
2121

2222
@pytest.fixture(scope='function')
2323
def dynamodb(aws_credentials):
24-
with mock_dynamodb():
24+
with mock_aws():
2525
yield boto3.resource('dynamodb', region_name='ap-southeast-2')
2626

2727

2828
@pytest.fixture(scope='function')
2929
def eventbridge(aws_credentials):
30-
with mock_events():
30+
with mock_aws():
3131
yield boto3.client('events', region_name='ap-southeast-2')
3232

3333

3434
@pytest.fixture(scope='function')
3535
def stepfunction(aws_credentials):
36-
with mock_stepfunctions():
36+
with mock_aws():
3737
yield boto3.client("stepfunctions", region_name='ap-southeast-2')
3838

3939

unicorn_web/tests/unit/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from aws_lambda_powertools.utilities.typing import LambdaContext
77

88
import pytest
9-
from moto import mock_dynamodb, mock_events, mock_sqs
9+
from moto import mock_aws
1010

1111

1212
@pytest.fixture(scope='function')
@@ -32,19 +32,19 @@ def env_vars():
3232

3333
@pytest.fixture(scope='function')
3434
def dynamodb(aws_credentials):
35-
with mock_dynamodb():
35+
with mock_aws():
3636
yield boto3.resource('dynamodb', region_name='ap-southeast-2')
3737

3838

3939
@pytest.fixture(scope='function')
4040
def eventbridge(aws_credentials):
41-
with mock_events():
41+
with mock_aws():
4242
yield boto3.client('events', region_name='ap-southeast-2')
4343

4444

4545
@pytest.fixture(scope='function')
4646
def sqs(aws_credentials):
47-
with mock_sqs():
47+
with mock_aws():
4848
yield boto3.client('sqs', region_name='ap-southeast-2')
4949

5050

0 commit comments

Comments
 (0)