Beispiel #1
0
    def test_validate_github_token(self):
        """Test for validate_github_token function."""
        if self.skip_github_tests:
            print("Skipping test_validate_github_token, no GitHub token available?")
            return

        if not HAVE_KEYRING:
            print("Skipping test_validate_github_token, keyring module not available")
            return

        self.assertTrue(gh.validate_github_token(self.github_token, GITHUB_TEST_ACCOUNT))

        # if a token in the old format is available, test with that too
        token_old_format = os.getenv('TEST_GITHUB_TOKEN_OLD_FORMAT')
        if token_old_format:
            self.assertTrue(gh.validate_github_token(token_old_format, GITHUB_TEST_ACCOUNT))
Beispiel #2
0
    def test_validate_github_token(self):
        """Test for validate_github_token function."""
        if self.skip_github_tests:
            print("Skipping test_validate_github_token, no GitHub token available?")
            return

        if not HAVE_KEYRING:
            print("Skipping test_validate_github_token, keyring module not available")
            return

        self.assertTrue(gh.validate_github_token(self.github_token, GITHUB_TEST_ACCOUNT))
Beispiel #3
0
    def test_validate_github_token(self):
        """Test for validate_github_token function."""
        if self.github_token is None:
            print "Skipping test_validate_github_token, no GitHub token available?"
            return

        if not HAVE_KEYRING:
            print "Skipping test_validate_github_token, keyring module not available"
            return

        self.assertTrue(gh.validate_github_token(self.github_token, GITHUB_TEST_ACCOUNT))