Skip to content

Commit 237db36

Browse files
author
Thomas Leonard
committed
chore: fix tests
1 parent db5b342 commit 237db36

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

graphene_federation/tests/test_annotation_corner_cases.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ChatQuery(ObjectType):
3131

3232
chat_schema = build_schema(query=ChatQuery)
3333
assert (
34-
str(chat_schema)
34+
str(chat_schema).strip().strip()
3535
== """schema {
3636
query: ChatQuery
3737
}
@@ -114,7 +114,7 @@ class Query(ObjectType):
114114

115115
schema = build_schema(query=Query)
116116
assert (
117-
str(schema)
117+
str(schema).strip()
118118
== """type Query {
119119
camel: Camel
120120
_entities(representations: [_Any]): [_Entity]
@@ -181,7 +181,7 @@ class Query(ObjectType):
181181

182182
schema = build_schema(query=Query, auto_camelcase=False)
183183
assert (
184-
str(schema)
184+
str(schema).strip()
185185
== """type Query {
186186
camel: Camel
187187
_entities(representations: [_Any]): [_Entity]
@@ -251,7 +251,7 @@ class Query(ObjectType):
251251

252252
schema = build_schema(query=Query)
253253
assert (
254-
str(schema)
254+
str(schema).strip()
255255
== """type Query {
256256
a: A
257257
_entities(representations: [_Any]): [_Entity]
@@ -326,7 +326,7 @@ class Query(ObjectType):
326326

327327
schema = build_schema(query=Query)
328328
assert (
329-
str(schema)
329+
str(schema).strip()
330330
== """type Query {
331331
a: Banana
332332
_entities(representations: [_Any]): [_Entity]

graphene_federation/tests/test_key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Query(ObjectType):
2020

2121
schema = build_schema(query=Query)
2222
assert (
23-
str(schema)
23+
str(schema).strip()
2424
== """type Query {
2525
user: User
2626
_entities(representations: [_Any]): [_Entity]

graphene_federation/tests/test_provides.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Query(ObjectType):
2828

2929
schema = build_schema(query=Query)
3030
assert (
31-
str(schema)
31+
str(schema).strip()
3232
== """type Query {
3333
inStockCount: InStockCount
3434
_entities(representations: [_Any]): [_Entity]
@@ -107,7 +107,7 @@ class Query(ObjectType):
107107

108108
schema = build_schema(query=Query)
109109
assert (
110-
str(schema)
110+
str(schema).strip()
111111
== """type Query {
112112
inStockCount: InStockCount
113113
_entities(representations: [_Any]): [_Entity]
@@ -186,7 +186,7 @@ class Query(ObjectType):
186186

187187
schema = build_schema(query=Query)
188188
assert (
189-
str(schema)
189+
str(schema).strip()
190190
== """type Query {
191191
inStockCount: InStockCount
192192
_entities(representations: [_Any]): [_Entity]

graphene_federation/tests/test_requires.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Query(ObjectType):
3939

4040
schema = build_schema(query=Query)
4141
assert (
42-
str(schema)
42+
str(schema).strip()
4343
== """type Query {
4444
product: Product
4545
_entities(representations: [_Any]): [_Entity]
@@ -106,7 +106,7 @@ class Query(ObjectType):
106106

107107
schema = build_schema(query=Query)
108108
assert (
109-
str(schema)
109+
str(schema).strip()
110110
== """type Query {
111111
product: Product
112112
_entities(representations: [_Any]): [_Entity]
@@ -172,7 +172,7 @@ class Query(ObjectType):
172172

173173
schema = build_schema(query=Query)
174174
assert (
175-
str(schema)
175+
str(schema).strip()
176176
== """type Query {
177177
acme: Acme
178178
_entities(representations: [_Any]): [_Entity]

graphene_federation/tests/test_schema_annotation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def test_user_schema():
8888
and that a request to retrieve a user works.
8989
"""
9090
assert (
91-
str(user_schema)
91+
str(user_schema).strip()
9292
== """schema {
9393
query: UserQuery
9494
}
@@ -156,7 +156,7 @@ def test_chat_schema():
156156
and that a request to retrieve a chat message works.
157157
"""
158158
assert (
159-
str(chat_schema)
159+
str(chat_schema).strip()
160160
== """schema {
161161
query: ChatQuery
162162
}

0 commit comments

Comments
 (0)