Пример #1
0
    def test_xml_contains_log_message_in_system_out_with_logcapture(self):
        self.logcapture_plugin = logcapture.LogCapture(session=self.session)
        self.logcapture_plugin.register()

        test = self.case('test_with_log')
        test(self.result)
        case = self.plugin.tree.find('testcase')
        system_out = case.find('system-out')
        assert system_out is not None
        assert 'log message' in system_out.text
        assert 'INFO' in system_out.text
Пример #2
0
    def test_xml_contains_log_message_in_system_out_with_logcapture(self):
        self.logcapture_plugin = logcapture.LogCapture(session=self.session)
        self.logcapture_plugin.register()

        test = self.case("test_with_log")
        test(self.result)
        case = self.plugin.tree.find("testcase")
        system_out = case.find("system-out")
        assert system_out is not None
        assert "log message" in system_out.text
        assert "INFO" in system_out.text
Пример #3
0
 def setUp(self):
     self.session = session.Session()
     self.plugin = logcapture.LogCapture(session=self.session)
     self.logging = logcapture.logging
     logcapture.logging = StubLogging()