Ejemplo n.º 1
0
    def test_router_start_logging(self):
        """
            Test that we can turn the logging on
        """
        r = Router(logging=False)
        assert r.send == r._send

        sevt = SourceEvent()
        r.send(sevt)
        assert len(r.logs) == 0

        r.start_logging()

        sevt2 = SourceEvent()
        r.send(sevt2)
        assert r.logs[0] is sevt2