graphene/examples/starwars_relay/tests/test_connections.py
2018-07-06 12:09:23 -07:00

34 lines
588 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))