Beispiel #1
0
 def test_writesOnlyMessageWithLF(self):
     sio = StringIO()
     PlainFileLogObserver(sio)({
         'system': 'some system',
         'message': ('hello', )
     })
     assert 'hello\n' == sio.getvalue()
Beispiel #2
0
    def test_writesOnlyMessageWithLF(self):
        sio = StringIO()
        PlainFileLogObserver(sio)(
            {"system": "some system", "message": ("hello",)}
        )

        assert "hello\n" == sio.getvalue()
Beispiel #3
0
 def test_isLogObserver(self):
     assert ILogObserver.providedBy(PlainFileLogObserver(StringIO()))
Beispiel #4
0
 def test_isLogObserver(self, sio):
     assert ILogObserver.providedBy(PlainFileLogObserver(sio))