aiida.backends.tests.tools.importexport package

Submodules

Complex tests for the export and import routines

class aiida.backends.tests.tools.importexport.test_complex.TestComplex(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test complex ex-/import cases

__module__ = 'aiida.backends.tests.tools.importexport.test_complex'
setUp()[source]

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

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_complex_graph_import_export(**kwargs)
test_reexport(**kwargs)

Tests for the export and import routines related to migration provenance_redesign

class aiida.backends.tests.tools.importexport.test_prov_redesign.TestProvenanceRedesign(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Check changes in database schema after upgrading to v0.4 (Provenance Redesign) This includes all migrations from “base_data_plugin_type_string” (django: 0008) until “dbgroup_type_string_change_content” (django: 0022), both included.

The effects of the large db migration “provenance_redesign” (django: 0020) is tested in TestLinks, since the greatest change concerns links.

__module__ = 'aiida.backends.tests.tools.importexport.test_prov_redesign'
test_base_data_type_change(**kwargs)
test_code_type_change(**kwargs)
test_group_name_and_type_change(**kwargs)
test_node_process_type(**kwargs)

Simple tests for the export and import routines

class aiida.backends.tests.tools.importexport.test_simple.TestSimple(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test simple ex-/import cases

__module__ = 'aiida.backends.tests.tools.importexport.test_simple'
setUp()[source]

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

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_base_data_nodes(**kwargs)
test_calc_of_structuredata(**kwargs)
test_check_for_export_format_version()[source]

Test the check for the export format version.

test_control_of_licenses()[source]

Test control of licenses.

Tests for the export and import routines

class aiida.backends.tests.tools.importexport.test_specific_import.TestSpecificImport(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test specific ex-/import cases

__module__ = 'aiida.backends.tests.tools.importexport.test_specific_import'
setUp()[source]

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

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_cycle_structure_data()[source]

Create an export with some orm.CalculationNode and Data nodes and import it after having cleaned the database. Verify that the nodes and their attributes are restored properly after importing the created export archive

test_empty_repo_folder_export(**kwargs)
test_missing_node_repo_folder_export(**kwargs)
test_missing_node_repo_folder_import(**kwargs)
test_simple_import()[source]

This is a very simple test which checks that an export file with nodes that are not associated to a computer is imported correctly. In Django when such nodes are exported, there is an empty set for computers in the export file. In SQLA there is such a set only when a computer is associated with the exported nodes. When an empty computer set is found at the export file (when imported to an SQLA profile), the SQLA import code used to crash. This test demonstrates this problem.

Utility functions for tests for the export and import routines

Get all Node links currently in the DB