Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format code with new black #44

Merged
merged 4 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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
Loading