diff --git a/.github/workflows/python-unittest.yml b/.github/workflows/python-unittest.yml index 12d6124..fd4c082 100644 --- a/.github/workflows/python-unittest.yml +++ b/.github/workflows/python-unittest.yml @@ -1,4 +1,4 @@ -name: Python Unittest CommuniAPI +name: Python Tests CommuniAPI on: [ push, pull_request ] @@ -45,6 +45,6 @@ jobs: - name: Run unittests run: | - python -m unittest tests.test_communi_api + pytest tests/* env: POETRY_HOME: ${{ github.workspace }}/.poetry \ No newline at end of file diff --git a/tests/test_communi_api.py b/tests/test_communi_api.py index 4090aab..42e2c0a 100644 --- a/tests/test_communi_api.py +++ b/tests/test_communi_api.py @@ -22,8 +22,9 @@ logging.config.dictConfig(config=logging_config) -class TestsCommuniApp(unittest.TestCase): +class TestsCommuniApp(): def setup_class(self) -> None: + """Common setup with testing provides api connections.""" if "COMMUNI_TOKEN" in os.environ: self.COMMUNI_TOKEN = os.environ["COMMUNI_TOKEN"] self.COMMUNI_SERVER = os.environ["COMMUNI_SERVER"] @@ -52,6 +53,7 @@ def setup_class(self) -> None: def tearDown(self) -> None: """Destroy the session after test execution to avoid resource issues.""" self.api.session.close() + logger.debug("Finished Tests RUN") def test_config(self) -> None: """Check that configuration exists."""