コード例 #1
0
ファイル: github_test.py プロジェクト: dahlia/geofront
def test_authorize(fx_github_identity: Identity, fx_github_org_login: str):
    org = GitHubOrganization('', '', fx_github_org_login)
    assert org.authorize(fx_github_identity)
コード例 #2
0
ファイル: github_test.py プロジェクト: dahlia/geofront
def test_list_groups(fx_github_identity: Identity, fx_github_org_login: str,
                     fx_github_team_slugs: typing.AbstractSet[str]):
    org = GitHubOrganization('', '', fx_github_org_login)
    groups = org.list_groups(fx_github_identity)
    assert groups == fx_github_team_slugs
コード例 #3
0
def test_list_groups(fx_github_identity: Identity, fx_github_org_login: str,
                     fx_github_team_slugs: typing.AbstractSet[str]):
    org = GitHubOrganization('', '', fx_github_org_login)
    groups = org.list_groups(fx_github_identity)
    assert groups == fx_github_team_slugs
コード例 #4
0
def test_authorize(fx_github_identity: Identity, fx_github_org_login: str):
    org = GitHubOrganization('', '', fx_github_org_login)
    assert org.authorize(fx_github_identity)
コード例 #5
0
ファイル: github_test.py プロジェクト: SettUK/geofront
def test_list_groups(fx_github_identity, fx_github_org_login,
                     fx_github_team_slugs):
    org = GitHubOrganization('', '', fx_github_org_login)
    groups = org.list_groups(fx_github_identity)
    assert groups == fx_github_team_slugs
コード例 #6
0
def test_list_groups(fx_github_identity, fx_github_org_login,
                     fx_github_team_slugs):
    org = GitHubOrganization('', '', fx_github_org_login)
    groups = org.list_groups(fx_github_identity)
    assert groups == fx_github_team_slugs
コード例 #7
0
# and are using git through ssh public key authorization.

# First of all, you have to decide how to authorize team members.
# Geofront provides a built-in authorization method for GitHub organizations.
# It requires a pair of client keys (id and secret) for OAuth authentication.
# You can create one from:
#
# https://github.com/organizations/YOUR_TEAM/settings/applications/new
#
# Then import GitHubOrganization class, and configure a pair of client keys
# and your organization login name (@YOUR_TEAM in here).
from geofront.backends.github import GitHubOrganization

TEAM = GitHubOrganization(
   client_id='0123456789abcdef0123',
   client_secret='0123456789abcdef0123456789abcdef01234567',
   org_login='******'
)

# Your colleagues have already registered their public keys to GitHub,
# so you don't need additional storage for public keys.  We'd use GitHub
# as your public key store.
from geofront.backends.github import GitHubKeyStore

KEY_STORE = GitHubKeyStore()

# Unlike public keys, the master key ideally ought to be accessible by
# only Geofront.  Assume you use Amazon Web Services.  So you'll store
# the master key to the your private S3 bucket named your_team_master_key.
from geofront.masterkey import CloudMasterKeyStore
from libcloud.storage.types import Provider