cryptonas-branches/pythonrewrite/plugins/logs/unittests.py
lars 1dc0da0382 unittests added to some plugins
added "name" tag to all form elements
2006-10-26 12:25:12 +00:00

21 lines
633 B
Python

import WebInterfaceTestClass
class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
def test_read_logs(self):
log_url = self.URL + "plugins/logs"
self.register_auth(log_url)
self.cmd.go(log_url)
self.cmd.find('class="console"')
def test_write_logs(self):
## we have to assume two things:
## 1) log level is at least "error"
## 2) the log message does not get lost in a possible stream of log messages
log_text = "unittest - just a marker - please ignore"
self.cbox.log.error(log_text)
log_url = self.URL + "plugins/logs"
self.register_auth(log_url)
self.cmd.go(log_url)
self.cmd.find(log_text)