Skip to content

Commit

Permalink
Merge pull request #44 from mirumee/update-black
Browse files Browse the repository at this point in the history
Format code with new black
  • Loading branch information
rafalp authored Jan 29, 2024
2 parents acad887 + e6c62f5 commit 6666667
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions ariadne_graphql_proxy/proxy_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,11 @@ async def root_resolver(
{
"operationName": operation_name,
"query": print_ast(query_document),
"variables": variables
if not variables
else {key: variables[key] for key in query_variables},
"variables": (
variables
if not variables
else {key: variables[key] for key in query_variables}
),
},
)
for schema_id, query_document, query_variables in queries
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies = ["graphql-core>=3.2.0,<3.3", "httpx", "ariadne"]
test = [
"black",
"freezegun",
"moto",
"moto[dynamodb]",
"mypy",
"pytest",
"pytest-mock",
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 @@ -5,7 +5,7 @@
import boto3
import pytest
from freezegun import freeze_time
from moto import mock_dynamodb
from moto import mock_aws

from ariadne_graphql_proxy.cache import CacheSerializer
from ariadne_graphql_proxy.contrib.aws import DynamoDBCacheBackend, DynamoDBCacheError
Expand All @@ -23,7 +23,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 @@ -38,7 +38,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 6666667

Please sign in to comment.