Skip to content

Commit

Permalink
fix: use proper prefix for function calls
Browse files Browse the repository at this point in the history
Signed-off-by: Zack Koppert <[email protected]>
  • Loading branch information
zkoppert committed Nov 5, 2024
1 parent 56274eb commit 753b2f3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import unittest
from unittest.mock import MagicMock, patch

import requests
import auth
import requests


class TestAuth(unittest.TestCase):
Expand Down Expand Up @@ -102,7 +102,7 @@ def test_get_github_app_installation_token_request_failure(self, mock_post):
mock_post.side_effect = requests.exceptions.RequestException("Request failed")

# Call the function with test data
result = get_github_app_installation_token(
result = auth.get_github_app_installation_token(
ghe="https://api.github.com",
gh_app_id=12345,
gh_app_private_key_bytes=b"private_key",
Expand All @@ -120,13 +120,14 @@ def test_auth_to_github_invalid_credentials(self, mock_login):
"""
mock_login.return_value = None
with self.assertRaises(ValueError) as context_manager:
auth_to_github("not_a_valid_token", "", "", b"", "", False)
auth.auth_to_github("not_a_valid_token", "", "", b"", "", False)

the_exception = context_manager.exception
self.assertEqual(
str(the_exception),
"Unable to authenticate to GitHub",
)


if __name__ == "__main__":
unittest.main()

0 comments on commit 753b2f3

Please sign in to comment.