

def setUp(self):
    super(TestLogs, self).setUp()
    self.log_dir = tempfile.mkdtemp()
    regexp.local_log_file = os.path.join(self.log_dir, 'nailgun.log')
    regexp = '^(?P<date>\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}:\\d{2}):(?P<level>\\w+):(?P<text>.+)$'
    self.patcher = mock.patch.object(settings, 'LOGS', [{
        'id': 'nailgun',
        'name': 'Nailgun',
        'remote': False,
        'regexp': regexp,
        'date_format': settings.UI_LOG_DATE_FORMAT,
        'levels': [],
        'path': self.local_log_file,
    }, {
        'id': 'syslog',
        'name': 'Syslog',
        'remote': True,
        'regexp': regexp,
        'date_format': settings.UI_LOG_DATE_FORMAT,
        'base': self.log_dir,
        'levels': [],
        'path': 'test-syslog.log',
    }])
    self.patcher.start()

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/unit/test_logs_handlers.py TestLogs.setUp/VarMisuse@31/37 `self`->`regexp`