コード例 #1
0
ファイル: test_github.py プロジェクト: repobee/repobee
    def test_accepts_valid_urls(self, url):
        api = github_plugin.GitHubAPI(url, TOKEN, ORG_NAME, USER)

        assert isinstance(api, plug.PlatformAPI)
コード例 #2
0
ファイル: test_github.py プロジェクト: repobee/repobee
    def test_raises_on_empty_user_arg(self):
        with pytest.raises(TypeError) as exc_info:
            github_plugin.GitHubAPI(BASE_URL, TOKEN, ORG_NAME, "")

        assert "argument 'user' must not be empty" in str(exc_info.value)
コード例 #3
0
ファイル: test_github.py プロジェクト: repobee/repobee
    def test_raises_when_url_is_bad(self, url):
        with pytest.raises(plug.PlugError) as exc_info:
            github_plugin.GitHubAPI(url, TOKEN, ORG_NAME, USER)

        assert ("invalid base url, should either be https://api.github.com or "
                "end with '/api/v3'" in str(exc_info.value))
コード例 #4
0
ファイル: test_github.py プロジェクト: repobee/repobee
def api(happy_github, organization, no_teams):
    return github_plugin.GitHubAPI(BASE_URL, TOKEN, ORG_NAME, USER)