Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalp committed Jan 29, 2024
1 parent 74d7d23 commit e6c62f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions tests/contrib/aws/test_cache_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"}],
Expand All @@ -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")
Expand Down

0 comments on commit e6c62f5

Please sign in to comment.