diff --git a/tests/integration/test_graphql_client.py b/tests/integration/test_graphql_client.py new file mode 100644 index 00000000..5cd1ea36 --- /dev/null +++ b/tests/integration/test_graphql_client.py @@ -0,0 +1,17 @@ +import pytest +from gql import Client +from services.github.graphql_client import get_graphql_client +from tests.constants import TOKEN + + +def test_get_graphql_client_integration(): + """ + Integration test for get_graphql_client + + This test creates a GraphQL client for the GitHub API using the token from + tests/constants.py. It verifies that the client is an instance of gql.Client. + + For more details, refer to the GitHub GraphQL API docs: https://docs.github.com/en/graphql + """ + client = get_graphql_client(TOKEN) + assert isinstance(client, Client) diff --git a/tests/services/supabase/test_users_manager.py b/tests/services/supabase/test_users_manager.py index 7d7910a9..2ce2cdf4 100644 --- a/tests/services/supabase/test_users_manager.py +++ b/tests/services/supabase/test_users_manager.py @@ -229,8 +229,8 @@ async def test_install_uninstall_install() -> None: .eq(column="owner_id", value=OWNER_ID) .execute() ) - assert owners_data[1][0]["owner_id"] == OWNER_ID - assert isinstance(owners_data[1][0]["stripe_customer_id"], str) + assert owners_data[0]["owner_id"] == OWNER_ID + assert isinstance(owners_data[0]["stripe_customer_id"], str) # Check Installation Record installation_data, _ = (