Merge branch 'fix-tests' into dev
This commit is contained in:
commit
8e54f566aa
7
fittrackee/tests/fixtures/fixtures_app.py
vendored
7
fittrackee/tests/fixtures/fixtures_app.py
vendored
@ -1,7 +1,9 @@
|
|||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
from typing import Generator, Optional, Union
|
from typing import Generator, Optional, Union
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from flask import current_app
|
||||||
|
|
||||||
from fittrackee import create_app, db
|
from fittrackee import create_app, db
|
||||||
from fittrackee.application.models import AppConfig
|
from fittrackee.application.models import AppConfig
|
||||||
@ -65,6 +67,11 @@ def get_app(
|
|||||||
# FATAL: remaining connection slots are reserved for
|
# FATAL: remaining connection slots are reserved for
|
||||||
# non-replication superuser connections
|
# non-replication superuser connections
|
||||||
db.engine.dispose()
|
db.engine.dispose()
|
||||||
|
# remove all temp files like gpx files
|
||||||
|
shutil.rmtree(
|
||||||
|
current_app.config['UPLOAD_FOLDER'],
|
||||||
|
ignore_errors=True,
|
||||||
|
)
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user