mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
33 lines
1.1 KiB
Python
33 lines
1.1 KiB
Python
from datetime import datetime, timedelta
|
|
|
|
from sentry.testutils.silo import control_silo_test
|
|
|
|
from ..github import test_search
|
|
|
|
|
|
@control_silo_test
|
|
class GithubEnterpriseSearchTest(test_search.GithubSearchTest):
|
|
# Inherit test methods/scenarios from GithubSearchTest
|
|
# and fill out the slots that customize it to use github:enterprise
|
|
provider = "github_enterprise"
|
|
base_url = "https://github.example.org/api/v3"
|
|
|
|
def create_integration(self):
|
|
future = datetime.now() + timedelta(hours=1)
|
|
return self.create_provider_integration(
|
|
provider=self.provider,
|
|
name="test",
|
|
external_id=9999,
|
|
metadata={
|
|
"domain_name": "github.example.org",
|
|
"account_type": "Organization",
|
|
"access_token": "123456789",
|
|
"expires_at": future.replace(microsecond=0).isoformat(),
|
|
"installation": {
|
|
"private_key": "some private key",
|
|
"id": 123456,
|
|
"verify_ssl": True,
|
|
},
|
|
},
|
|
)
|