MCPcopy Create free account
hub / github.com/graphql-python/graphene / check

Function check

graphene/relay/tests/test_connection_query.py:93–106  ·  view source on GitHub ↗
(args, letters, has_previous_page=False, has_next_page=False)

Source from the content-addressed store, hash-verified

91
92
93async def check(args, letters, has_previous_page=False, has_next_page=False):
94 result = await execute(args)
95 expected_edges = edges(letters)
96 expected_page_info = {
97 "hasPreviousPage": has_previous_page,
98 "hasNextPage": has_next_page,
99 "endCursor": expected_edges[-1]["cursor"] if expected_edges else None,
100 "startCursor": expected_edges[0]["cursor"] if expected_edges else None,
101 }
102
103 assert not result.errors
104 assert result.data == {
105 "letters": {"edges": expected_edges, "pageInfo": expected_page_info}
106 }
107
108
109@mark.asyncio

Calls 2

executeFunction · 0.70
edgesFunction · 0.70

Tested by

no test coverage detected