#!/usr/bin/env python3 import unittest import logging import os import sys import urllib.request import tarfile import subprocess from shutil import rmtree from pathlib import Path parent_dir = str(Path(__file__).parent.parent.absolute()) sys.path.append(parent_dir) sys.path.append("/opengnsys/installer") print(parent_dir) from gitlib import OpengnsysGitLibrary class GitTests(unittest.TestCase): def setUp(self): self.logger = logging.getLogger("OpengnsysTest") self.oggit = OpengnsysGitLibrary() self.logger.info("setUp()") if not hasattr(self, 'init_complete'): self.init_complete = True def test_init(self): self.assertIsNotNone(self.oggit) def test_acls(self): self.oggit.ogCreateAcl() def test_sync_local(self): # self.oggit.ogSyncLocalGitImage() None if __name__ == '__main__': logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)20s - [%(levelname)5s] - %(message)s') logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) logger.info("Inicio del programa") unittest.main()