cryptonas/plugins/logs/unittests.py
lars 1438913656 renamed python package to cryptobox-server
unittests are working again
http-error handling implemented
2006-11-27 19:25:26 +00:00

22 lines
621 B
Python

import cryptobox.web.testclass
class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
def test_read_logs(self):
log_url = self.URL + "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 + "logs"
self.register_auth(log_url)
self.cmd.go(log_url)
self.cmd.find(log_text)