2006-11-27 20:25:26 +01:00
|
|
|
import cryptobox.web.testclass
|
2006-11-06 17:05:00 +01:00
|
|
|
|
2006-11-27 20:25:26 +01:00
|
|
|
class unittests(cryptobox.web.testclass.WebInterfaceTestClass):
|
2006-11-06 17:05:00 +01:00
|
|
|
|
|
|
|
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):
|
|
|
|
log_text = "unittest - just a marker - please ignore"
|
|
|
|
self.cbox.log.error(log_text)
|
|
|
|
log_url = self.URL + "logs"
|
|
|
|
self.register_auth(log_url)
|
2006-11-29 14:39:51 +01:00
|
|
|
self.cmd.go(log_url + "?pattern=ERROR")
|
2006-11-06 17:05:00 +01:00
|
|
|
self.cmd.find(log_text)
|
|
|
|
|
2006-11-29 14:39:51 +01:00
|
|
|
## TODO: check the filtering functions
|
|
|
|
|