

@mock.patch.dict('nailgun.task.task.settings.DUMP', {
    'lastdump': 'LASTDUMP',
})
@fake_tasks(fake_rpc=False, mock_rpc=False)
@mock.patch('nailgun.rpc.cast')
def test_snapshot_cast(self, mocked_rpc):
    task = self.env.create_task(name='dump')
    DumpTask.execute(task)
    message = {
        'api_version': '1',
        'method': 'dump_environment',
        'respond_to': 'dump_environment_resp',
        'args': {
            'task_uuid': task.uuid,
            'settings': DumpTask.conf(),
        },
    }
    (args, kwargs) = nailgun.task.task.rpc.cast.call_args
    self.assertEqual(len(kwargs), 2)
    self.datadiff(args[1], message)

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/unit/test_logs_handlers.py TestLogs.test_snapshot_cast/VarMisuse@139/213 `args`->`kwargs`