aiida.backends.tests.tools.importexport.orm package

Submodules

Extras tests for the export and import routines

class aiida.backends.tests.tools.importexport.orm.test_attributes.TestAttributes(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test ex-/import cases related to Attributes

__module__ = 'aiida.backends.tests.tools.importexport.orm.test_attributes'
create_data_with_attr()[source]
import_attributes()[source]

Import an AiiDA database

test_import_of_attributes(**kwargs)

orm.CalcNode tests for the export and import routines

class aiida.backends.tests.tools.importexport.orm.test_calculations.TestCalculations(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test ex-/import cases related to Calculations

__module__ = 'aiida.backends.tests.tools.importexport.orm.test_calculations'
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_calcfunction(**kwargs)
test_workcalculation(**kwargs)

orm.Code tests for the export and import routines

class aiida.backends.tests.tools.importexport.orm.test_codes.TestCode(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test ex-/import cases related to Codes

__module__ = 'aiida.backends.tests.tools.importexport.orm.test_codes'
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_input_code(**kwargs)
test_solo_code(**kwargs)
test_that_solo_code_is_exported_correctly(**kwargs)

orm.Comment tests for the export and import routines

class aiida.backends.tests.tools.importexport.orm.test_comments.TestComments(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test ex-/import cases related to Comments

__module__ = 'aiida.backends.tests.tools.importexport.orm.test_comments'
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_calc_and_data_nodes_with_comments(**kwargs)
test_exclude_comments_flag(**kwargs)
test_import_arg_comment_mode(**kwargs)
test_mtime_of_imported_comments(**kwargs)
test_multiple_imports_for_single_node(**kwargs)
test_multiple_user_comments_single_node(**kwargs)
test_reimport_of_comments_for_single_node(**kwargs)

orm.Computer tests for the export and import routines

class aiida.backends.tests.tools.importexport.orm.test_computers.TestComputer(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test ex-/import cases related to Computers

__module__ = 'aiida.backends.tests.tools.importexport.orm.test_computers'
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_different_computer_same_name_import(**kwargs)
test_import_of_computer_json_params(**kwargs)
test_import_of_django_sqla_export_file()[source]

Check that sqla import manages to import the django export file correctly

test_same_computer_different_name_import(**kwargs)
test_same_computer_import(**kwargs)

Extras tests for the export and import routines

class aiida.backends.tests.tools.importexport.orm.test_extras.TestExtras(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test ex-/import cases related to Extras

__module__ = 'aiida.backends.tests.tools.importexport.orm.test_extras'
import_extras(mode_new='import')[source]

Import an aiida database

modify_extras(mode_existing)[source]

Import the same aiida database again

setUp()[source]

This function runs before every test execution

classmethod setUpClass(*args, **kwargs)[source]

Only run to prepare an export file

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

classmethod tearDownClass(*args, **kwargs)[source]

Remove tmp_folder

test_absence_of_extras()[source]

Check whether extras are not imported if the mode is set to ‘none’

test_extras_import_mode_correct()[source]

Test all possible import modes except ‘ask’

test_extras_import_mode_keep_existing()[source]

Check if old extras are not modified in case of name collision

test_extras_import_mode_mirror()[source]

Check if old extras are fully overwritten by the imported ones

test_extras_import_mode_none()[source]

Check if old extras are fully overwritten by the imported ones

test_extras_import_mode_strange()[source]

Check a mode that is probably does not make much sense but is still available

test_extras_import_mode_update_existing()[source]

Check if old extras are modified in case of name collision

test_extras_import_mode_wrong()[source]

Check a mode that is wrong

test_import_of_extras()[source]

Check if extras are properly imported

orm.Group tests for the export and import routines

class aiida.backends.tests.tools.importexport.orm.test_groups.TestGroups(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test ex-/import cases related to Groups

__module__ = 'aiida.backends.tests.tools.importexport.orm.test_groups'
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_group_export(**kwargs)
test_group_import_existing(**kwargs)
test_import_to_group(**kwargs)
test_nodes_in_group(**kwargs)

orm links tests for the export and import routines

Bases: aiida.backends.testbase.AiidaTestCase

Test ex-/import cases related to Links

__module__ = 'aiida.backends.tests.tools.importexport.orm.test_links'
construct_complex_graph(export_combination=0, work_nodes=None, calc_nodes=None)[source]

This method creates a “complex” graph with all available link types: INPUT_WORK, INPUT_CALC, CALL_WORK, CALL_CALC, CREATE, and RETURN and returns the nodes of the graph. It also returns various combinations of nodes that need to be extracted but also the final expected set of nodes (after adding the expected predecessors, desuccessors).

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_workflow_graph_export_sets(**kwargs)
test_data_create_reversed_false(**kwargs)

orm.Log tests for the export and import routines

class aiida.backends.tests.tools.importexport.orm.test_logs.TestLogs(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test ex-/import cases related to Logs

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

Reset database prior to all tests

tearDown()[source]

Delete all the created log entries

test_critical_log_msg_and_metadata(**kwargs)
test_exclude_logs_flag(**kwargs)
test_export_of_imported_logs(**kwargs)
test_multiple_imports_for_single_node(**kwargs)
test_reimport_of_logs_for_single_node(**kwargs)

orm.User tests for the export and import routines

class aiida.backends.tests.tools.importexport.orm.test_users.TestUsers(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test ex-/import cases related to Users

__module__ = 'aiida.backends.tests.tools.importexport.orm.test_users'
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_nodes_belonging_to_different_users(**kwargs)
test_non_default_user_nodes(**kwargs)