From 5d204890d49148b7436d3c3a81d6042859222c50 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 13:31:37 +0000 Subject: [PATCH 1/4] feat: Updated libs/langchain/tests/integration_tes --- libs/langchain/tests/integration_tests/utilities/test_github.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/langchain/tests/integration_tests/utilities/test_github.py b/libs/langchain/tests/integration_tests/utilities/test_github.py index 48997887a24fd..f7ab9b15e56e3 100644 --- a/libs/langchain/tests/integration_tests/utilities/test_github.py +++ b/libs/langchain/tests/integration_tests/utilities/test_github.py @@ -2,6 +2,8 @@ import pytest from langchain.utilities.github import GitHubAPIWrapper +import logging +import logging # Make sure you have set the following env variables: # GITHUB_REPOSITORY From 9493d177ec9aa455c23aedf78502be6b6a3219ce Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 13:33:52 +0000 Subject: [PATCH 2/4] feat: Updated libs/langchain/tests/integration_tes --- .../tests/integration_tests/utilities/test_github.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/langchain/tests/integration_tests/utilities/test_github.py b/libs/langchain/tests/integration_tests/utilities/test_github.py index f7ab9b15e56e3..04cbdefbe9dbb 100644 --- a/libs/langchain/tests/integration_tests/utilities/test_github.py +++ b/libs/langchain/tests/integration_tests/utilities/test_github.py @@ -13,11 +13,11 @@ @pytest.fixture -def api_client() -> GitHubAPIWrapper: +def api_client(api_token: str = None, repository: str = None) -> GitHubAPIWrapper: return GitHubAPIWrapper() def test_get_open_issues(api_client: GitHubAPIWrapper) -> None: """Basic test to fetch issues""" - issues = api_client.get_issues() + issues = api_client.get_issues(filter='all') assert len(issues) != 0 From e9ca64bb9e6151330fa524cba94ae29488af047d Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 13:34:16 +0000 Subject: [PATCH 3/4] feat: Updated libs/langchain/tests/integration_tes --- .../tests/integration_tests/utilities/test_github.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/langchain/tests/integration_tests/utilities/test_github.py b/libs/langchain/tests/integration_tests/utilities/test_github.py index 04cbdefbe9dbb..b5df389d2fe76 100644 --- a/libs/langchain/tests/integration_tests/utilities/test_github.py +++ b/libs/langchain/tests/integration_tests/utilities/test_github.py @@ -6,8 +6,8 @@ import logging # Make sure you have set the following env variables: -# GITHUB_REPOSITORY -# GITHUB_BRANCH +# GITHUB_REPOSITORY_ENV +# GITHUB_BRANCH_ENV # GITHUB_APP_ID # GITHUB_PRIVATE_KEY From d4e329cf39abacd40327e03d565964968f66dcf3 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 13:34:59 +0000 Subject: [PATCH 4/4] feat: Updated libs/langchain/tests/integration_tes --- .../tests/integration_tests/utilities/test_github.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/langchain/tests/integration_tests/utilities/test_github.py b/libs/langchain/tests/integration_tests/utilities/test_github.py index b5df389d2fe76..944275158263f 100644 --- a/libs/langchain/tests/integration_tests/utilities/test_github.py +++ b/libs/langchain/tests/integration_tests/utilities/test_github.py @@ -13,11 +13,13 @@ @pytest.fixture -def api_client(api_token: str = None, repository: str = None) -> GitHubAPIWrapper: +def api_client(api_token: str = None, repository: str = 'owner/repo') -> GitHubAPIWrapper: return GitHubAPIWrapper() def test_get_open_issues(api_client: GitHubAPIWrapper) -> None: - """Basic test to fetch issues""" + """Test to fetch open issues when the repository does not exist""" + issues = api_client.get_issues(filter='all', repository='nonexistent/repo') + assert len(issues) == 0 issues = api_client.get_issues(filter='all') assert len(issues) != 0