From f2c417b638b09002fa1ba51675e7bf155436502f Mon Sep 17 00:00:00 2001 From: Will Daly Date: Wed, 16 Oct 2013 10:13:26 -0400 Subject: [PATCH] Write Django logs to file during acceptance tests --- cms/envs/acceptance.py | 5 +++-- lms/envs/acceptance.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cms/envs/acceptance.py b/cms/envs/acceptance.py index e5ed2261b5..51e3183a52 100644 --- a/cms/envs/acceptance.py +++ b/cms/envs/acceptance.py @@ -14,9 +14,10 @@ from lms.envs.sauce import * # otherwise the browser will not render the pages correctly DEBUG = True -# Disable warnings for acceptance tests, to make the logs readable +# Output Django logs to a file import logging -logging.disable(logging.ERROR) +logging.basicConfig(filename=TEST_ROOT / "log" / "cms_acceptance.log", level=logging.ERROR) + import os from random import choice, randint diff --git a/lms/envs/acceptance.py b/lms/envs/acceptance.py index 9f2f0866db..5414705b79 100644 --- a/lms/envs/acceptance.py +++ b/lms/envs/acceptance.py @@ -14,9 +14,10 @@ from .sauce import * # otherwise the browser will not render the pages correctly DEBUG = True -# Disable warnings for acceptance tests, to make the logs readable +# Output Django logs to a file import logging -logging.disable(logging.ERROR) +logging.basicConfig(filename=TEST_ROOT / "log" / "lms_acceptance.log", level=logging.ERROR) + import os from random import choice, randint import string