diff --git a/pyproject.toml b/pyproject.toml index 5320d4d..138fa2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,8 +25,8 @@ dependencies = ["graphql-core>=3.2.0,<3.3", "httpx", "ariadne"] test = [ "black", "freezegun", - "moto", - "mypy[dynamodb]", + "moto[dynamodb]", + "mypy", "pytest", "pytest-mock", "pytest-httpx", diff --git a/tests/contrib/aws/test_cache_backend.py b/tests/contrib/aws/test_cache_backend.py index 0d6785d..a571309 100644 --- a/tests/contrib/aws/test_cache_backend.py +++ b/tests/contrib/aws/test_cache_backend.py @@ -4,7 +4,7 @@ import boto3 import pytest from freezegun import freeze_time -from moto import mock_dynamodb +from moto import mock_aws from ariadne_graphql_proxy.contrib.aws import DynamoDBCacheBackend, DynamoDBCacheError @@ -21,7 +21,7 @@ def aws_credentials(): @pytest.fixture def test_table(aws_credentials): - with mock_dynamodb(): + with mock_aws(): table = boto3.resource("dynamodb").create_table( TableName="test_table", KeySchema=[{"AttributeName": "key", "KeyType": "HASH"}], @@ -36,7 +36,7 @@ def test_object_can_be_created_with_existing_table_name(test_table): DynamoDBCacheBackend(table_name="test_table") -@mock_dynamodb +@mock_aws def test_init_raises_dynamodb_cache_error_for_unavailable_table(aws_credentials): with pytest.raises(DynamoDBCacheError): DynamoDBCacheBackend(table_name="not_exisitng_table_name")