

@mock.patch.dict('nailgun.task.task.settings.DUMP', {
    'dump': {
        'local': {
            'hosts': [],
            'objects': [],
        },
        'master': {
            'hosts': [],
            'objects': [{
                'type': 'dir',
                'path': '/var/log/remote',
            }],
        },
        'slave': {
            'hosts': [],
            'objects': [],
        },
    },
    'target': '/path/to/save',
    'lastdump': '/path/to/latest',
    'timestamp': True,
    'compression_level': 3,
    'timeout': 60,
})
def test_snapshot_conf(self):
    self.env.create_node(status='ready', hostname='node111', ip='10.109.0.2')
    conf = {
        'dump': {
            'local': {
                'hosts': [],
                'objects': [],
            },
            'master': {
                'hosts': [],
                'objects': [{
                    'type': 'dir',
                    'path': '/var/log/remote',
                }],
            },
            'slave': {
                'hosts': [{
                    'hostname': 'node111',
                    'address': '10.109.0.2',
                    'ssh-key': '/root/.ssh/id_rsa',
                    'ssh-user': 'root',
                }],
                'objects': [],
            },
        },
        'target': '/path/to/save',
        'lastdump': '/path/to/latest',
        'timestamp': True,
        'compression_level': 3,
        'timeout': 60,
    }
    conf.datadiff(DumpTask.conf(), conf)

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/unit/test_logs_handlers.py TestLogs.test_snapshot_conf/VarMisuse@276/452 `self`->`conf`