Make tox work with python 3.11
All checks were successful
buildbot/django-dav-events--test Build done.

This commit is contained in:
2023-05-24 09:47:38 +02:00
parent 5edec18ea9
commit 811983abfe
5 changed files with 13 additions and 15 deletions

View File

@@ -11,6 +11,7 @@ from dav_base.tests.utils import mkdtemp
# from dav_base.console_scripts.admin import DJANGO_MAIN_MODULE
DJANGO_MAIN_MODULE = 'main'
TMP_BASE_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'tmp')
class DjangoEnvironment:
@@ -42,7 +43,7 @@ class DjangoEnvironment:
prefix = 'testrun-{datetime}-'.format(
datetime=datetime.datetime.now().strftime('%Y%m%d-%H%M')
)
self.path = mkdtemp(prefix=prefix)
self.path = mkdtemp(prefix=prefix, base_dir=TMP_BASE_DIR)
self._install_djangoproject(self.path, modules=self._enable_modules)