

def test_verify_networks_with_dhcp_subtask(self):
    'verify_networks status depends on dhcp subtask\n\n        Test verifies that when dhcp subtask is ready and\n        verify_networks errored - verify_networks will be in error\n        '
    cluster_db = self.env.create(cluster_kwargs={
        
    }, nodes_kwargs=[{
        'api': False,
    }, {
        'api': False,
    }])
    (node1, node2) = self.env.nodes
    nets_sent = [{
        'iface': 'eth0',
        'vlans': range(100, 105),
    }]
    task = Task(name='verify_networks', cluster_id=cluster_db.id)
    task.cache = {
        'args': {
            'nodes': self.nodes_message((node1, node2), nets_sent),
            'offline': 0,
        },
    }
    self.db.add(task)
    self.db.commit()
    dhcp_subtask = Task(name='check_dhcp', cluster_id=cluster_db.id, parent_id=task.id, status='ready')
    self.db.add(dhcp_subtask)
    self.db.commit()
    kwargs = {
        'task_uuid': task.uuid,
        'status': 'ready',
        'nodes': node1.nodes_message((node1, node2), []),
    }
    kwargs['nodes'][0]['networks'] = nets_sent
    self.receiver.verify_networks_resp(**kwargs)
    self.assertEqual(task.status, 'error')

dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/integration/test_rpc_consumer.py TestVerifyNetworks.test_verify_networks_with_dhcp_subtask/VarMisuse@213/346 `self`->`node1`