Beispiel #1
0
    def setUp(self):
        super(PostArgParseSetupTest, self).setUp()
        self.config = mock.MagicMock(
            debug=False, logs_dir=self.tempdir, max_log_backups=1000,
            quiet=False, verbose_count=constants.CLI_DEFAULTS['verbose_count'])
        self.devnull = open(os.devnull, 'w')

        from certbot.log import ColoredStreamHandler
        self.stream_handler = ColoredStreamHandler(six.StringIO())
        from certbot.log import MemoryHandler, TempHandler
        self.temp_handler = TempHandler()
        self.temp_path = self.temp_handler.path
        self.memory_handler = MemoryHandler(self.temp_handler)
        self.root_logger = mock.MagicMock(
            handlers=[self.memory_handler, self.stream_handler])
Beispiel #2
0
 def setUp(self):
     self.closed = False
     from certbot.log import TempHandler
     self.handler = TempHandler()