Debian Codegraph @

tests/legacy/github/test_graphql.py

raw
1 # pylint: disable=missing-docstring, redefined-outer-name, unused-import
2 import pytest
3
4 from aiogithubapi import GitHub
5
6 from tests.common import TOKEN, load_fixture
7
8
9 @pytest.mark.asyncio
10 async def test_graphql(client_session):
11 async with GitHub(TOKEN, session=client_session) as github:
12 repository = await github.graphql(
13 query='query{repository(owner: "awesome", name: "repo"){description}}'
14 )
15 assert repository["repository"]["description"] == "This your first repo!"