4
4
5
5
from graphene .relay import Node
6
6
7
- from .fixtures import setup_fixtures
7
+ from .fixtures import fixtures
8
8
from .models import Article , Reporter
9
9
from .types import (ArticleNode ,
10
10
EditorNode ,
@@ -18,7 +18,7 @@ def get_nodes(data, key):
18
18
return map (lambda edge : edge ['node' ], data [key ]['edges' ])
19
19
20
20
21
- def test_should_query_reporter (setup_fixtures ):
21
+ def test_should_query_reporter (fixtures ):
22
22
23
23
class Query (graphene .ObjectType ):
24
24
node = Node .Field ()
@@ -113,7 +113,7 @@ def resolve_reporter(self, *args, **kwargs):
113
113
assert dict (result .data ['reporter' ]) == expected ['reporter' ]
114
114
115
115
116
- def test_should_query_all_editors (setup_fixtures ):
116
+ def test_should_query_all_editors (fixtures ):
117
117
118
118
class Query (graphene .ObjectType ):
119
119
node = Node .Field ()
@@ -166,7 +166,7 @@ class Query(graphene.ObjectType):
166
166
assert dict (result .data ['allEditors' ]) == expected ['allEditors' ]
167
167
168
168
169
- def test_should_filter_editors_by_id (setup_fixtures ):
169
+ def test_should_filter_editors_by_id (fixtures ):
170
170
171
171
class Query (graphene .ObjectType ):
172
172
node = Node .Field ()
@@ -205,7 +205,7 @@ class Query(graphene.ObjectType):
205
205
assert dict (result .data ['allEditors' ]) == expected ['allEditors' ]
206
206
207
207
208
- def test_should_filter (setup_fixtures ):
208
+ def test_should_filter (fixtures ):
209
209
210
210
class Query (graphene .ObjectType ):
211
211
node = Node .Field ()
@@ -245,7 +245,7 @@ class Query(graphene.ObjectType):
245
245
assert result .data == expected
246
246
247
247
248
- def test_should_filter_by_reference_field (setup_fixtures ):
248
+ def test_should_filter_by_reference_field (fixtures ):
249
249
250
250
class Query (graphene .ObjectType ):
251
251
node = Node .Field ()
@@ -285,7 +285,7 @@ class Query(graphene.ObjectType):
285
285
assert result .data == expected
286
286
287
287
288
- def test_should_filter_through_inheritance (setup_fixtures ):
288
+ def test_should_filter_through_inheritance (fixtures ):
289
289
290
290
class Query (graphene .ObjectType ):
291
291
node = Node .Field ()
@@ -322,7 +322,7 @@ class Query(graphene.ObjectType):
322
322
expected , sort_keys = True )
323
323
324
324
325
- def test_should_get_node_by_id (setup_fixtures ):
325
+ def test_should_get_node_by_id (fixtures ):
326
326
# Notes: https://goo.gl/hMNRgs
327
327
class Query (graphene .ObjectType ):
328
328
reporter = Node .Field (ReporterNode )
@@ -348,7 +348,7 @@ class Query(graphene.ObjectType):
348
348
assert result .data == expected
349
349
350
350
351
- def test_should_first_n (setup_fixtures ):
351
+ def test_should_first_n (fixtures ):
352
352
353
353
class Query (graphene .ObjectType ):
354
354
@@ -404,7 +404,7 @@ class Query(graphene.ObjectType):
404
404
for item in get_nodes (expected , 'editors' ))
405
405
406
406
407
- def test_should_after (setup_fixtures ):
407
+ def test_should_after (fixtures ):
408
408
class Query (graphene .ObjectType ):
409
409
410
410
players = MongoengineConnectionField (PlayerNode )
@@ -447,7 +447,7 @@ class Query(graphene.ObjectType):
447
447
expected , sort_keys = True )
448
448
449
449
450
- def test_should_before (setup_fixtures ):
450
+ def test_should_before (fixtures ):
451
451
class Query (graphene .ObjectType ):
452
452
453
453
players = MongoengineConnectionField (PlayerNode )
@@ -490,7 +490,7 @@ class Query(graphene.ObjectType):
490
490
expected , sort_keys = True )
491
491
492
492
493
- def test_should_last_n (setup_fixtures ):
493
+ def test_should_last_n (fixtures ):
494
494
class Query (graphene .ObjectType ):
495
495
players = MongoengineConnectionField (PlayerNode )
496
496
@@ -532,7 +532,7 @@ class Query(graphene.ObjectType):
532
532
expected , sort_keys = True )
533
533
534
534
535
- def test_should_self_reference (setup_fixtures ):
535
+ def test_should_self_reference (fixtures ):
536
536
537
537
class Query (graphene .ObjectType ):
538
538
0 commit comments