Possible fix for one unit test

This commit is contained in:
frisco 2009-02-28 07:27:02 +00:00
parent e2b335f5d0
commit f2d88519b0
2 changed files with 12 additions and 8 deletions

View File

@ -87,7 +87,7 @@ class CryptoBox:
use it with: 'self.log.[debug|info|warning|error|critical](logmessage)'
all classes should get the logging instance during __init__:
self.log = logging.getLogger("CryptoBox")
self.log = logging.getLogger("CryptoNAS")
first we output all warnings/errors to stderr
as soon as we opened the config file successfully, we redirect debug output
@ -95,12 +95,16 @@ class CryptoBox:
"""
import logging
## basicConfig(...) needs python >= 2.4
################################################
## Set the default log level here:
DEFAULT_LOG_LEVEL=logging.ERROR
################################################
try:
log_handler = logging.getLogger("CryptoBox")
log_handler = logging.getLogger("CryptoNAS")
logging.basicConfig(
format = '%(asctime)s CryptoBox %(levelname)s: %(message)s',
format = '%(asctime)s CryptoNAS %(levelname)s: %(message)s',
stderr = sys.stderr)
log_handler.setLevel(logging.ERROR)
log_handler.setLevel(DEFAULT_LOG_LEVEL)
log_handler.info("loggingsystem is up'n running")
## from now on everything can be logged via self.log...
except:

View File

@ -52,11 +52,11 @@ class BuiltinPages(WebInterfaceTestClass):
'''display all devices'''
self.register_auth(self.url)
self.cmd.go(self.url)
self.cmd.find("The CryptoBox")
self.cmd.find("The CryptoNAS")
self.cmd.go(self.url + "?weblang=de")
self.cmd.find("Die CryptoBox")
self.cmd.find("Die CryptoNAS")
self.cmd.go(self.url + "?weblang=sl")
self.cmd.find("Privatnost v vsako vas")
self.cmd.find("CryptoNAS je projekt")
self.cmd.go(self.url + "?weblang=fr")
self.cmd.find("La CryptoBox")
self.cmd.find("La CryptoNAS")