UPD: improved global test-suite.

This commit is contained in:
2019-04-24 11:43:53 +02:00
parent e5af1faf48
commit f942d2ce56
2 changed files with 44 additions and 24 deletions

12
dav_base/tests/utils.py Normal file
View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from tempfile import mkdtemp as _mkdtmp
def mkdtemp(prefix):
dirname = os.path.dirname
pkg_base_dir = dirname(dirname(dirname(__file__)))
tmp_dir = os.path.join(pkg_base_dir, 'tmp')
os.makedirs(tmp_dir, exist_ok=True)
return _mkdtmp(prefix=prefix, dir=tmp_dir)