[damned-lies] Setup temporary media dir for vertimus tests
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Setup temporary media dir for vertimus tests
- Date: Mon, 14 Nov 2016 21:17:55 +0000 (UTC)
commit b4678a96d3aaf4853eac4e8ac53b57b3a0123728
Author: Claude Paroz <claude 2xlibre net>
Date: Mon Nov 14 21:57:14 2016 +0100
Setup temporary media dir for vertimus tests
vertimus/tests/tests.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/vertimus/tests/tests.py b/vertimus/tests/tests.py
index c329e63..01d089a 100644
--- a/vertimus/tests/tests.py
+++ b/vertimus/tests/tests.py
@@ -18,6 +18,7 @@
# along with this program; if not, see <http://www.gnu.org/licenses/>.
import os
+import tempfile
from xml.dom.minidom import parseString
from django.conf import settings
@@ -26,6 +27,7 @@ from django.core.files.uploadedfile import SimpleUploadedFile
from django.core import mail
from django.core.urlresolvers import reverse
from django.http import QueryDict
+from django.test.utils import override_settings
from django.utils.datastructures import MultiValueDict
from teams.tests import TeamsAndRolesTests
@@ -34,6 +36,10 @@ from stats.tests import patch_shell_command, test_scratchdir
from vertimus.models import *
from vertimus.forms import ActionForm
+MEDIA_ROOT = tempfile.mkdtemp()
+
+
+@override_settings(MEDIA_ROOT=MEDIA_ROOT)
class VertimusTest(TeamsAndRolesTests):
def setUp(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]