

def test_nodes(self):
    self._create_basic_deployment()
    nodes = self.client.nodes.list(deployment_id=self.deployment_id)
    self.assertEqual(1, len(nodes))
    all_nodes = self.client.nodes.list()
    self.assertEqual(1, len(all_nodes))
    node = all_nodes[0]
    self.assertTrue((len(node.operations) > 0))
    self.assertEqual(node.relationships, [])
    self.assertEqual(self.blueprint_id, node.blueprint_id)
    self.assertTrue((len(node.plugins) > 0))
    self.assertEqual(self.node_id, node.id)
    self.assertEqual(1, node.number_of_instances)
    self.assertEqual(self.node_id, nodes.host_id)
    self.assertEqual(2, len(node.type_hierarchy))
    self.assertEqual(self.deployment_id, node.deployment_id)
    self.assertEqual('cloudify.nodes.Compute', node.type)
    self.assertTrue((len(node.properties) > 0))

dataset/ETHPy150Open cloudify-cosmo/cloudify-manager/tests/workflow_tests/test_rest_api.py RestAPITest.test_nodes/VarMisuse@165/196 `node`->`nodes`