Create a test GitHub service with mock credentials.
(github_credentials)
| 28 | |
| 29 | @pytest.fixture |
| 30 | def github_service(github_credentials): |
| 31 | """Create a test GitHub service with mock credentials.""" |
| 32 | # Create a mock service that doesn't make actual API calls |
| 33 | with patch.object(GitHubService, '_verify_access', return_value=None): |
| 34 | # Create the service with the test token |
| 35 | service = GitHubService(token=github_credentials.token) |
| 36 | |
| 37 | # Mock the _make_request method to avoid making actual API calls |
| 38 | service._make_request = MagicMock() |
| 39 | |
| 40 | return service |
| 41 | |
| 42 | |
| 43 | def test_get_repository(github_service): |
nothing calls this directly
no test coverage detected