import WebInterfaceTestClass

class unittests(WebInterfaceTestClass.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)

