Skip to content

Commit 50c8792

Browse files
committed
refactor: Separate relay test case.
1 parent 7811e49 commit 50c8792

File tree

3 files changed

+378
-357
lines changed

3 files changed

+378
-357
lines changed

graphene_mongo/tests/fixtures.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
from .models import Article, Editor, Player, Reporter
2+
3+
4+
def setup_fixtures():
5+
print('setup_fixtures' * 10)
6+
editor1 = Editor(first_name='Penny', last_name='Hardaway')
7+
editor1.save()
8+
editor2 = Editor(first_name='Grant', last_name='Hill')
9+
editor2.save()
10+
editor3 = Editor(first_name='Dennis', last_name='Rodman')
11+
editor3.save()
12+
13+
reporter = Reporter(first_name='Allen', last_name='Iverson',
14+
email='[email protected]', awards=['2010-mvp'])
15+
article1 = Article(headline='Hello', editor=editor1)
16+
article1.save()
17+
article2 = Article(headline='World', editor=editor2)
18+
article2.save()
19+
20+
reporter.articles = [article1, article2]
21+
reporter.save()
22+
23+
player1 = Player(first_name='Michael', last_name='Jordan')
24+
player1.save()
25+
player2 = Player(first_name='Magic', last_name='Johnson', opponent=player1)
26+
player2.save()
27+
player3 = Player(first_name='Larry', last_name='Bird', players=[player1, player2])
28+
player3.save()
29+
30+
player1.players = [player2]
31+
player1.save()
32+
33+
player2.players = [player1]
34+
player2.save()

0 commit comments

Comments
 (0)