mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-30 13:33:55 +03:00
33 lines
587 B
Python
33 lines
587 B
Python
from graphene.test import Client
|
|
from ..data import setup
|
|
from ..schema import schema
|
|
|
|
setup()
|
|
|
|
client = Client(schema)
|
|
|
|
|
|
def test_correct_fetch_first_ship_rebels(snapshot):
|
|
query = '''
|
|
query RebelsShipsQuery {
|
|
rebels {
|
|
name,
|
|
ships(first: 1) {
|
|
pageInfo {
|
|
startCursor
|
|
endCursor
|
|
hasNextPage
|
|
hasPreviousPage
|
|
}
|
|
edges {
|
|
cursor
|
|
node {
|
|
name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
'''
|
|
snapshot.assert_match(client.execute(query))
|