Write Django logs to file during acceptance tests

This commit is contained in:
Will Daly
2013-10-16 10:13:26 -04:00
parent fd49f09284
commit f2c417b638
2 changed files with 6 additions and 4 deletions

View File

@@ -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

View File

@@ -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