Skip to content

Commit e7011f3

Browse files
committed
fixed: linting
1 parent fc846f0 commit e7011f3

File tree

4 files changed

+73
-68
lines changed

4 files changed

+73
-68
lines changed
Lines changed: 57 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,58 @@
11
[
2-
{
3-
"LogicalResourceId": "SuperCoolAPI",
4-
"ResourceType": "AWS::AppSync::GraphQLApi"
5-
},
6-
{
7-
"LogicalResourceId": "SuperCoolAPICloudWatchRole",
8-
"ResourceType": "AWS::IAM::Role"
9-
},
10-
{
11-
"LogicalResourceId": "SuperCoolAPISchema",
12-
"ResourceType": "AWS::AppSync::GraphQLSchema"
13-
},
14-
{
15-
"LogicalResourceId": "SuperCoolAPIQuerygetBook",
16-
"ResourceType": "AWS::AppSync::Resolver"
17-
},
18-
{
19-
"LogicalResourceId": "SuperCoolAPINoneDataSource",
20-
"ResourceType": "AWS::AppSync::DataSource"
21-
},
22-
{
23-
"LogicalResourceId": "SuperCoolAPIprocessQuery",
24-
"ResourceType": "AWS::AppSync::FunctionConfiguration"
25-
},
26-
{
27-
"LogicalResourceId": "SuperCoolAPIMyApiKey",
28-
"ResourceType": "AWS::AppSync::ApiKey"
29-
},
30-
{
31-
"LogicalResourceId": "IntrospectionDisableSuperCoolAPI",
32-
"ResourceType": "AWS::AppSync::GraphQLApi"
33-
},
34-
{
35-
"LogicalResourceId": "IntrospectionDisableSuperCoolAPICloudWatchRole",
36-
"ResourceType": "AWS::IAM::Role"
37-
},
38-
{
39-
"LogicalResourceId": "IntrospectionDisableSuperCoolAPISchema",
40-
"ResourceType": "AWS::AppSync::GraphQLSchema"
41-
},
42-
{
43-
"LogicalResourceId": "IntrospectionDisableSuperCoolAPIQuerygetBook",
44-
"ResourceType": "AWS::AppSync::Resolver"
45-
},
46-
{
47-
"LogicalResourceId": "IntrospectionDisableSuperCoolAPINoneDataSource",
48-
"ResourceType": "AWS::AppSync::DataSource"
49-
},
50-
{
51-
"LogicalResourceId": "IntrospectionDisableSuperCoolAPIprocessQuery",
52-
"ResourceType": "AWS::AppSync::FunctionConfiguration"
53-
},
54-
{
55-
"LogicalResourceId": "IntrospectionDisableSuperCoolAPIMyApiKey",
56-
"ResourceType": "AWS::AppSync::ApiKey"
57-
}
58-
]
59-
2+
{
3+
"LogicalResourceId": "SuperCoolAPI",
4+
"ResourceType": "AWS::AppSync::GraphQLApi"
5+
},
6+
{
7+
"LogicalResourceId": "SuperCoolAPICloudWatchRole",
8+
"ResourceType": "AWS::IAM::Role"
9+
},
10+
{
11+
"LogicalResourceId": "SuperCoolAPISchema",
12+
"ResourceType": "AWS::AppSync::GraphQLSchema"
13+
},
14+
{
15+
"LogicalResourceId": "SuperCoolAPIQuerygetBook",
16+
"ResourceType": "AWS::AppSync::Resolver"
17+
},
18+
{
19+
"LogicalResourceId": "SuperCoolAPINoneDataSource",
20+
"ResourceType": "AWS::AppSync::DataSource"
21+
},
22+
{
23+
"LogicalResourceId": "SuperCoolAPIprocessQuery",
24+
"ResourceType": "AWS::AppSync::FunctionConfiguration"
25+
},
26+
{
27+
"LogicalResourceId": "SuperCoolAPIMyApiKey",
28+
"ResourceType": "AWS::AppSync::ApiKey"
29+
},
30+
{
31+
"LogicalResourceId": "IntrospectionDisableSuperCoolAPI",
32+
"ResourceType": "AWS::AppSync::GraphQLApi"
33+
},
34+
{
35+
"LogicalResourceId": "IntrospectionDisableSuperCoolAPICloudWatchRole",
36+
"ResourceType": "AWS::IAM::Role"
37+
},
38+
{
39+
"LogicalResourceId": "IntrospectionDisableSuperCoolAPISchema",
40+
"ResourceType": "AWS::AppSync::GraphQLSchema"
41+
},
42+
{
43+
"LogicalResourceId": "IntrospectionDisableSuperCoolAPIQuerygetBook",
44+
"ResourceType": "AWS::AppSync::Resolver"
45+
},
46+
{
47+
"LogicalResourceId": "IntrospectionDisableSuperCoolAPINoneDataSource",
48+
"ResourceType": "AWS::AppSync::DataSource"
49+
},
50+
{
51+
"LogicalResourceId": "IntrospectionDisableSuperCoolAPIprocessQuery",
52+
"ResourceType": "AWS::AppSync::FunctionConfiguration"
53+
},
54+
{
55+
"LogicalResourceId": "IntrospectionDisableSuperCoolAPIMyApiKey",
56+
"ResourceType": "AWS::AppSync::ApiKey"
57+
}
58+
]

integration/resources/templates/single/graphqlapi-configuration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@ Outputs:
9191
Value: !GetAtt IntrospectionDisableSuperCoolAPIMyApiKey.ApiKey
9292

9393
Metadata:
94-
SamTransformTest: true
94+
SamTransformTest: true

integration/single/test_graphqlapi_configuration.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,26 @@ def test_api(self):
6060
response = execute_and_verify_appsync_query(url, api_key, query)
6161
self.assertEqual(response["data"]["getBook"]["bookName"], book_name)
6262

63-
introspection_disable_query_response = execute_and_verify_appsync_query(introspection_disable_api_url, introspection_disable_api_key, query)
63+
introspection_disable_query_response = execute_and_verify_appsync_query(
64+
introspection_disable_api_url, introspection_disable_api_key, query
65+
)
6466
self.assertEqual(introspection_disable_query_response["data"]["getBook"]["bookName"], book_name)
6567

66-
query_introsepction = f"""
67-
query myQuery {{
68-
__schema {{
69-
types {{
68+
query_introsepction = """
69+
query myQuery {
70+
__schema {
71+
types {
7072
name
71-
}}
72-
}}
73-
}}
73+
}
74+
}
75+
}
7476
"""
7577

7678
introspection_query_response = execute_and_verify_appsync_query(url, api_key, query_introsepction)
7779
self.assertIsNotNone(introspection_query_response["data"]["__schema"])
7880

7981
# sending introspection query and expecting error as introspection is DISABLED for this API using template file
8082
with self.assertRaises(Exception):
81-
execute_and_verify_appsync_query(introspection_disable_api_url, introspection_disable_api_key, query_introsepction)
83+
execute_and_verify_appsync_query(
84+
introspection_disable_api_url, introspection_disable_api_key, query_introsepction
85+
)

pytest.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ filterwarnings =
2020
ignore::pytest.PytestUnraisableExceptionWarning
2121
# https://github.com/urllib3/urllib3/blob/main/src/urllib3/poolmanager.py#L313
2222
ignore::DeprecationWarning:urllib3.*:
23+
# https://github.com/boto/boto3/issues/3889
24+
ignore:datetime.datetime.utcnow

0 commit comments

Comments
 (0)