diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 17fcdb1..2c058e6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,33 +9,7 @@ on: jobs: unit-tests: runs-on: ubuntu-latest - env: - AUTH_CLIENT: regtech-client - AUTH_URL: http://localhost:8880/realms/regtech/protocol/openid-connect/auth - TOKEN_URL: http://localhost:8880/realms/regtech/protocol/openid-connect/token - CERTS_URL: http://localhost:8880/realms/regtech/protocol/openid-connect/certs - KC_URL: http://localhost:8880/;KC_REALM=regtech;KC_ADMIN_CLIENT_ID=admin-cli - KC_ADMIN_CLIENT_SECRET: local_test_only - KC_REALM_URL: http://localhost:8880/realms/regtech - DB_NAME: filing - DB_USER: filing_user - DB_PWD: filing_user - DB_HOST: localhost:5432 - DB_SCHEMA: filing - JWT_OPTS_VERIFY_AT_HASH: false - JWT_OPTS_VERIFY_AUD: false - JWT_OPTS_VERIFY_ISS: false - FS_UPLOAD_CONFIG__PROTOCOL: file - FS_UPLOAD_CONFIG__ROOT: ../upload - INST_DB_HOST: localhost:5432 - INST_DB_NAME: financial_institutions - INST_DB_PWD: fi - INST_DB_SCHEMA: public - INST_DB_USER: fi - EXPIRED_SUBMISSION_CHECK_SECS: 120 - SERVER_CONFIG__RELOAD: true - PYTHONUNBUFFERED: 1 - DB_SCHEME: postgresql + permissions: # Gives the action the necessary permissions for publishing new # comments in pull requests. diff --git a/pyproject.toml b/pyproject.toml index 12dab0d..48ec7bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,19 @@ source = ["src"] [tool.coverage.report] skip_empty = true +[tool.pytest.ini_options] +asyncio_mode = "auto" +pythonpath = ["src"] +addopts = [ + "--cov-report=term-missing", + "--cov-branch", + "--cov-report=xml", + "--cov-report=term", + "--cov=src", + "-vv", + "--strict-markers", + "-rfE", +] env = [ "AUTH_CLIENT=regtech-client", "AUTH_URL=http://localhost", @@ -70,3 +83,6 @@ env = [ "KC_URL=http://localhost:8880", "TOKEN_URL=http://localhost" ] + +testpaths = ["tests"] + diff --git a/tests/entities/conftest.py b/tests/entities/conftest.py index f4be34e..1495cd0 100644 --- a/tests/entities/conftest.py +++ b/tests/entities/conftest.py @@ -1,7 +1,7 @@ import pytest from sbl_filing_api.entities.models.dao import Base as Filing_Base from regtech_user_fi_management.entities.models.dao import Base as Institution_Base -from tests.entities.test_dao import Base as Test_Base +from test_dao import Base as Test_Base from sqlalchemy import Engine, create_engine from sqlalchemy.orm import sessionmaker, scoped_session