mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-15 06:07:28 +03:00
34 lines
588 B
Python
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))
|