MCPcopy Create free account
hub / github.com/agenticsorg/edge-agents / github_service

Function github_service

scripts/agents/devops/tests/github/test_github.py:30–40  ·  view source on GitHub ↗

Create a test GitHub service with mock credentials.

(github_credentials)

Source from the content-addressed store, hash-verified

28
29@pytest.fixture
30def 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
43def test_get_repository(github_service):

Callers

nothing calls this directly

Calls 1

GitHubServiceClass · 0.90

Tested by

no test coverage detected