Skip to content

Commit 01f9bbc

Browse files
committed
minor: Rename setup_fixtures to fixtures
1 parent ad8d557 commit 01f9bbc

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

graphene_mongo/tests/fixtures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
)
66

77
@pytest.fixture(scope='module')
8-
def setup_fixtures():
9-
print('setup_fixtures')
8+
def fixtures():
9+
print('fixtures')
1010
Editor.drop_collection()
1111
editor1 = Editor(
1212
id='1',

graphene_mongo/tests/test_mutation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
from graphene.relay import Node
44

5-
from .fixtures import setup_fixtures
5+
from .fixtures import fixtures
66
from .models import (Article, Editor)
77
from .types import (ArticleNode, EditorNode)
88

99

10-
def test_should_create(setup_fixtures):
10+
def test_should_create(fixtures):
1111

1212
class CreateArticle(graphene.Mutation):
1313

@@ -57,7 +57,7 @@ class Mutation(graphene.ObjectType):
5757
assert result.data == expected
5858

5959

60-
def test_should_update(setup_fixtures):
60+
def test_should_update(fixtures):
6161

6262
class UpdateEditor(graphene.Mutation):
6363

graphene_mongo/tests/test_query.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import graphene
44

5-
from .fixtures import setup_fixtures
5+
from .fixtures import fixtures
66
from .models import (
77
Editor, Player, Reporter, ProfessorVector
88
)
@@ -11,7 +11,7 @@
1111
)
1212

1313

14-
def test_should_query_editor(setup_fixtures):
14+
def test_should_query_editor(fixtures):
1515

1616
class Query(graphene.ObjectType):
1717

@@ -63,7 +63,7 @@ def resolve_editors(self, *args, **kwargs):
6363
assert all(item in result.data['editors'] for item in expected['editors'])
6464

6565

66-
def test_should_query_reporter(setup_fixtures):
66+
def test_should_query_reporter(fixtures):
6767

6868
class Query(graphene.ObjectType):
6969
reporter = graphene.Field(ReporterType)
@@ -125,7 +125,7 @@ def resolve_reporter(self, *args, **kwargs):
125125
assert dict(result.data['reporter']) == expected['reporter']
126126

127127

128-
def test_should_custom_kwargs(setup_fixtures):
128+
def test_should_custom_kwargs(fixtures):
129129

130130
class Query(graphene.ObjectType):
131131

@@ -163,7 +163,7 @@ def resolve_editors(self, *args, **kwargs):
163163
assert all(item in result.data['editors'] for item in expected['editors'])
164164

165165

166-
def test_should_self_reference(setup_fixtures):
166+
def test_should_self_reference(fixtures):
167167

168168
class Query(graphene.ObjectType):
169169

@@ -227,7 +227,7 @@ def resolve_all_players(self, *args, **kwargs):
227227
assert json.dumps(result.data, sort_keys=True) == json.dumps(expected, sort_keys=True)
228228

229229

230-
def test_should_query_with_embedded_document(setup_fixtures):
230+
def test_should_query_with_embedded_document(fixtures):
231231

232232
class Query(graphene.ObjectType):
233233
professor_vector = graphene.Field(ProfessorVectorType, id=graphene.String())

graphene_mongo/tests/test_relay_query.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from graphene.relay import Node
66

7-
from .fixtures import setup_fixtures
7+
from .fixtures import fixtures
88
from .models import Article, Reporter
99
from .types import (ArticleNode,
1010
EditorNode,
@@ -18,7 +18,7 @@ def get_nodes(data, key):
1818
return map(lambda edge: edge['node'], data[key]['edges'])
1919

2020

21-
def test_should_query_reporter(setup_fixtures):
21+
def test_should_query_reporter(fixtures):
2222

2323
class Query(graphene.ObjectType):
2424
node = Node.Field()
@@ -113,7 +113,7 @@ def resolve_reporter(self, *args, **kwargs):
113113
assert dict(result.data['reporter']) == expected['reporter']
114114

115115

116-
def test_should_query_all_editors(setup_fixtures):
116+
def test_should_query_all_editors(fixtures):
117117

118118
class Query(graphene.ObjectType):
119119
node = Node.Field()
@@ -166,7 +166,7 @@ class Query(graphene.ObjectType):
166166
assert dict(result.data['allEditors']) == expected['allEditors']
167167

168168

169-
def test_should_filter_editors_by_id(setup_fixtures):
169+
def test_should_filter_editors_by_id(fixtures):
170170

171171
class Query(graphene.ObjectType):
172172
node = Node.Field()
@@ -205,7 +205,7 @@ class Query(graphene.ObjectType):
205205
assert dict(result.data['allEditors']) == expected['allEditors']
206206

207207

208-
def test_should_filter(setup_fixtures):
208+
def test_should_filter(fixtures):
209209

210210
class Query(graphene.ObjectType):
211211
node = Node.Field()
@@ -245,7 +245,7 @@ class Query(graphene.ObjectType):
245245
assert result.data == expected
246246

247247

248-
def test_should_filter_by_reference_field(setup_fixtures):
248+
def test_should_filter_by_reference_field(fixtures):
249249

250250
class Query(graphene.ObjectType):
251251
node = Node.Field()
@@ -285,7 +285,7 @@ class Query(graphene.ObjectType):
285285
assert result.data == expected
286286

287287

288-
def test_should_filter_through_inheritance(setup_fixtures):
288+
def test_should_filter_through_inheritance(fixtures):
289289

290290
class Query(graphene.ObjectType):
291291
node = Node.Field()
@@ -322,7 +322,7 @@ class Query(graphene.ObjectType):
322322
expected, sort_keys=True)
323323

324324

325-
def test_should_get_node_by_id(setup_fixtures):
325+
def test_should_get_node_by_id(fixtures):
326326
# Notes: https://goo.gl/hMNRgs
327327
class Query(graphene.ObjectType):
328328
reporter = Node.Field(ReporterNode)
@@ -348,7 +348,7 @@ class Query(graphene.ObjectType):
348348
assert result.data == expected
349349

350350

351-
def test_should_first_n(setup_fixtures):
351+
def test_should_first_n(fixtures):
352352

353353
class Query(graphene.ObjectType):
354354

@@ -404,7 +404,7 @@ class Query(graphene.ObjectType):
404404
for item in get_nodes(expected, 'editors'))
405405

406406

407-
def test_should_after(setup_fixtures):
407+
def test_should_after(fixtures):
408408
class Query(graphene.ObjectType):
409409

410410
players = MongoengineConnectionField(PlayerNode)
@@ -447,7 +447,7 @@ class Query(graphene.ObjectType):
447447
expected, sort_keys=True)
448448

449449

450-
def test_should_before(setup_fixtures):
450+
def test_should_before(fixtures):
451451
class Query(graphene.ObjectType):
452452

453453
players = MongoengineConnectionField(PlayerNode)
@@ -490,7 +490,7 @@ class Query(graphene.ObjectType):
490490
expected, sort_keys=True)
491491

492492

493-
def test_should_last_n(setup_fixtures):
493+
def test_should_last_n(fixtures):
494494
class Query(graphene.ObjectType):
495495
players = MongoengineConnectionField(PlayerNode)
496496

@@ -532,7 +532,7 @@ class Query(graphene.ObjectType):
532532
expected, sort_keys=True)
533533

534534

535-
def test_should_self_reference(setup_fixtures):
535+
def test_should_self_reference(fixtures):
536536

537537
class Query(graphene.ObjectType):
538538

0 commit comments

Comments
 (0)