Skip to content

Commit b385382

Browse files
committed
Fixed random failed tests
1 parent 5431b7d commit b385382

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

tests/mutation/test_mutation.py

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def test_contains_correct_payload():
147147
}
148148
}
149149
'''
150-
expected = {
150+
expected1 = {
151151
'__type': {
152152
'name': 'SimpleMutationPayload',
153153
'kind': 'OBJECT',
@@ -174,9 +174,36 @@ def test_contains_correct_payload():
174174
]
175175
}
176176
}
177+
expected2 = {
178+
'__type': {
179+
'name': 'SimpleMutationPayload',
180+
'kind': 'OBJECT',
181+
'fields': [
182+
{
183+
'name': 'result',
184+
'type': {
185+
'name': 'Int',
186+
'kind': 'SCALAR',
187+
'ofType': None
188+
}
189+
},
190+
{
191+
'name': 'clientMutationId',
192+
'type': {
193+
'name': None,
194+
'kind': 'NON_NULL',
195+
'ofType': {
196+
'name': 'String',
197+
'kind': 'SCALAR'
198+
}
199+
}
200+
},
201+
]
202+
}
203+
}
177204
result = graphql(schema, query)
178205
assert result.errors == None
179-
assert result.data == expected
206+
assert result.data == expected1 or result.data == expected2
180207

181208
def test_contains_correct_field():
182209
query = '''

0 commit comments

Comments
 (0)