aiida.backends.tests.orm.node package

Submodules

Tests for the Node ORM class.

Bases: aiida.backends.testbase.AiidaTestCase

Test for linking from and to Node.

__module__ = 'aiida.backends.tests.orm.node.test_node'
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_add_incoming_call_calc()[source]

Nodes can only have a single incoming CALL_CALC link, independent of the source node.

test_add_incoming_call_work()[source]

Nodes can only have a single incoming CALL_WORK link, independent of the source node.

test_add_incoming_create()[source]

Nodes can only have a single incoming CREATE link, independent of the source node.

test_add_incoming_input_calc()[source]

Nodes can have an infinite amount of incoming INPUT_CALC links, as long as the link pair is unique.

test_add_incoming_input_work()[source]

Nodes can have an infinite amount of incoming INPUT_WORK links, as long as the link pair is unique.

test_add_incoming_return()[source]

Nodes can have an infinite amount of incoming RETURN links, as long as the link triple is unique.

test_computer_user_immutability()[source]

Test that computer and user of a node are immutable after storing.

test_get_incoming()[source]

Test that Node.get_incoming will return stored and cached input links.

test_get_node_by_label()[source]

Test the get_node_by_label() method of the LinkManager

In particular, check both the it returns the correct values, but also that it raises the expected exceptions where appropriate (missing link with a given label, or more than one link)

Validate the get_stored_link_triples method.

test_node_indegree_unique_pair()[source]

Test that the validation of links with indegree unique_pair works correctly

The example here is a DataNode that has two incoming links with the same label, but with different types. This is legal and should pass validation.

test_node_indegree_unique_triple()[source]

Test that the validation of links with indegree unique_triple works correctly

The example here is a DataNode that has two incoming RETURN links with the same label, but from different source nodes. This is legal and should pass validation.

test_node_outdegree_unique_triple()[source]

Test that the validation of links with outdegree unique_triple works correctly

The example here is a CalculationNode that has two outgoing CREATE links with the same label, but to different target nodes. This is legal and should pass validation.

test_repository_garbage_collection()[source]

Verify that the repository sandbox folder is cleaned after the node instance is garbage collected.

test_tab_completable_properties()[source]

Test properties to go from one node to a neighboring one

test_validate_incoming()[source]

Test the validate_incoming method

For a generic Node all incoming link types are valid as long as the source is also of type Node and the link type is a valid LinkType enum value.

test_validate_incoming_ipsum()[source]

Test the validate_incoming method with respect to linking ourselves.