Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
k-shlomi committed Aug 21, 2023
1 parent 81794a1 commit ebcc3d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_get_repos_from_github(mock_repos, expected_result, mocker):

organization_mock.get_repos.return_value = mock_repos
github_mock.get_organization.return_value = organization_mock
mocker.patch("clients.github.Github", return_value=github_mock) # Adjust the import path.
mocker.patch("src.shared.clients.github.Github", return_value=github_mock) # Adjust the import path.

# Run the function
repositories = get_repos_from_github()
Expand All @@ -41,7 +41,7 @@ def test_get_repos_from_github(mock_repos, expected_result, mocker):

def test_get_repos_from_github_exception(mocker):
# Mocking Github to raise an exception
mocker.patch("clients.github.Github", side_effect=Exception("Sample exception")) # Adjust the import path.
mocker.patch("src.shared.clients.github.Github", side_effect=Exception("Sample exception")) # Adjust the import path.

# Test that the function logs an error and returns None
result = get_repos_from_github()
Expand Down

0 comments on commit ebcc3d2

Please sign in to comment.