def test_pygit2_check_ssh__no_ssh(self, mock_pygit2): """ TestPygit2Utils:test_pygit2_check_no_ssh: Check for missing ssh support """ # Mock needed pygit2 components mock_pygit2.features = pygit2.GIT_FEATURE_HTTPS mock_pygit2.GIT_FEATURE_SSH = pygit2.GIT_FEATURE_SSH mock_pygit2.GIT_FEATURE_HTTPS = pygit2.GIT_FEATURE_HTTPS result = pygit2_utils.pygit2_check_ssh() self.assertFalse(result)
def test_pygit2_check_ssh__have_ssh(self, mock_pygit2): """ TestPygit2Utils:test_pygit2_check_ssh: Check for successful ssh support """ # Mock needed pygit2 components mock_pygit2.features = pygit2.GIT_FEATURE_SSH mock_pygit2.GIT_FEATURE_SSH = pygit2.GIT_FEATURE_SSH mock_pygit2.GIT_FEATURE_HTTPS = pygit2.GIT_FEATURE_HTTPS result = pygit2_utils.pygit2_check_ssh() self.assertTrue(result)