aiida.backends.tests.tools.importexport.migration package

Submodules

Test export file migration from old export versions to the newest

class aiida.backends.tests.tools.importexport.migration.test_migration.TestExportFileMigration(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test export file migrations

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

Reset database before each test

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

Add variables (once) to be used by all tests

test_migrate_newest_version()[source]

Test critical message and SystemExit is raised, when an export file with the newest export version is migrated

test_migrate_recursively()[source]

Test function ‘migrate_recursively’

test_no_node_export(**kwargs)
test_v02_to_newest(**kwargs)
test_v03_to_newest(**kwargs)
test_v04_to_newest(**kwargs)
test_v05_to_newest(**kwargs)
test_v06_to_newest(**kwargs)
test_wrong_versions()[source]

Test correct errors are raised if export files have wrong version numbers

Test export file migration from export version 0.1 to 0.2

class aiida.backends.tests.tools.importexport.migration.test_v01_to_v02.TestMigrateV01toV02(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test migration of export files from export version 0.1 to 0.2

__module__ = 'aiida.backends.tests.tools.importexport.migration.test_v01_to_v02'
test_migrate_v1_to_v2()[source]

Test function migrate_v1_to_v2

Test export file migration from export version 0.2 to 0.3

class aiida.backends.tests.tools.importexport.migration.test_v02_to_v03.TestMigrateV02toV03(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test migration of export files from export version 0.2 to 0.3

__module__ = 'aiida.backends.tests.tools.importexport.migration.test_v02_to_v03'
classmethod setUpClass(*args, **kwargs)[source]

Hook method for setting up class fixture before running tests in the class.

test_compare_migration_with_aiida_made()[source]

Compare the migration of a Workflow made and exported with version 0.2 to version 0.3, and the same Workflow made and exported with version 0.3. (AiiDA versions 0.9.1 versus 0.12.3) NB: Since PKs and UUIDs will have changed, comparisons between ‘data.json’-files will be made indirectly

test_migrate_v2_to_v3()[source]

Test function migrate_v2_to_v3

test_migrate_v2_to_v3_complete()[source]

Test migration for file containing complete v0.2 era possibilities

Test export file migration from export version 0.3 to 0.4

class aiida.backends.tests.tools.importexport.migration.test_v03_to_v04.TestMigrateV03toV04(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test migration of export files from export version 0.3 to 0.4

__module__ = 'aiida.backends.tests.tools.importexport.migration.test_v03_to_v04'
classmethod setUpClass(*args, **kwargs)[source]

Hook method for setting up class fixture before running tests in the class.

test_compare_migration_with_aiida_made()[source]

Compare the migration of a Workflow made and exported with version 0.3 to version 0.4, and the same Workflow made and exported with version 0.4. (AiiDA versions 0.12.3 versus 1.0.0b2) NB: Since PKs and UUIDs will have changed, comparisons between ‘data.json’-files will be made indirectly

Test illegal create links from workchain are detected and removed from exports using v0.3

test_migrate_v3_to_v4()[source]

Test function migrate_v3_to_v4

test_migrate_v3_to_v4_complete()[source]

Test migration for file containing complete v0.3 era possibilities

Test export file migration from export version 0.4 to 0.5

class aiida.backends.tests.tools.importexport.migration.test_v04_to_v05.TestMigrateV04toV05(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test migration of export files from export version 0.4 to 0.5

__module__ = 'aiida.backends.tests.tools.importexport.migration.test_v04_to_v05'
classmethod setUpClass(*args, **kwargs)[source]

Hook method for setting up class fixture before running tests in the class.

test_migrate_v4_to_v5()[source]

Test function migrate_v4_to_v5

test_migrate_v4_to_v5_complete()[source]

Test migration for file containing complete v0.4 era possibilities

Test export file migration from export version 0.5 to 0.6

class aiida.backends.tests.tools.importexport.migration.test_v05_to_v06.TestMigrateV05toV06(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test migration of export files from export version 0.5 to 0.6

__module__ = 'aiida.backends.tests.tools.importexport.migration.test_v05_to_v06'
classmethod setUpClass(*args, **kwargs)[source]

Hook method for setting up class fixture before running tests in the class.

test_migrate_v5_to_v6()[source]

Test migration for file containing complete v0.5 era possibilities

test_migrate_v5_to_v6_calc_states()[source]

Test the data migration of legacy JobCalcState attributes.

This test has to use a local archive because the current archive from the aiida-export-migration-tests module does not include a CalcJobNode with a legacy state attribute.

test_migrate_v5_to_v6_complete()[source]

Test migration for file containing complete v0.5 era possibilities

test_migrate_v5_to_v6_datetime()[source]

Test the data migration of serialized datetime objects.

Datetime attributes were serialized into strings, by first converting to UTC and then printing with the format ‘%Y-%m-%dT%H:%M:%S.%f’. In the database migration, datetimes were serialized including timezone information. Here we test that the archive migration correctly reattaches the timezone information. The archive that we are using export_v0.5_simple.aiida contains a node with the attribute “scheduler_lastchecktime”.

Test export file migration from export version 0.6 to 0.7

class aiida.backends.tests.tools.importexport.migration.test_v06_to_v07.TestMigrateV06toV07(methodName='runTest')[source]

Bases: aiida.backends.testbase.AiidaTestCase

Test migration of export files from export version 0.6 to 0.7

__module__ = 'aiida.backends.tests.tools.importexport.migration.test_v06_to_v07'
classmethod setUpClass(*args, **kwargs)[source]

Hook method for setting up class fixture before running tests in the class.

test_migrate_v6_to_v7()[source]

Test migration for file containing complete v0.6 era possibilities

test_migrate_v6_to_v7_complete()[source]

Test migration for file containing complete v0.6 era possibilities

test_migration_0040_corrupt_archive()[source]

Check CorruptArchive is raised for different cases during migration 0040

test_migration_0040_no_process_state()[source]

Check old ProcessNodes without a process_state can be migrated