Skip to content

Commit

Permalink
- Fixed workflow v3
Browse files Browse the repository at this point in the history
  • Loading branch information
onstabb committed Sep 29, 2023
1 parent 8afba80 commit fb46bde
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ jobs:
run: cd tests

- name: Run Tests
run: pytest .
run: |
pip install pytest pytest-cov
pytest . --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pytest]
pythonpath = src/ tests/
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def factory_random(seed):


@pytest.fixture(scope="session")
def file_conf():
def image_file_storage_conf():
storage_dir = os.path.join(DATA_DIR, "Image Storage")
if not os.path.exists(storage_dir):
os.mkdir(storage_dir)
Expand All @@ -71,7 +71,7 @@ def city_db():

@pytest.fixture(scope="session")
def db_mock_config():
db = init_db(host=config.DB_HOST, db=config.DB_NAME, mongo_client_class=MongoClient)
db = init_db(host=config.DB_HOST, db=config.DB_NAME, mongo_client_class=MongoClient, )
yield db
close_db()

Expand All @@ -86,7 +86,7 @@ def db_config(factory_random):


@pytest.fixture()
def client(db_config, scheduler, city_db, file_conf):
def client(db_config, scheduler, city_db, image_file_storage_conf):
auth_config.SMS_SERVICE_DISABLED = True
client = TestClient(app=app)
yield client
Expand Down

0 comments on commit fb46bde

Please sign in to comment.