aiida.backends.tests.manage.backup package¶
Submodules¶
Tests for the Backup classes.
-
class
aiida.backends.tests.manage.backup.test_backup_script.
TestBackupScriptIntegration
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Integration tests for the Backup classes.
-
__module__
= 'aiida.backends.tests.manage.backup.test_backup_script'¶
-
_aiida_rel_path
= '.aiida'¶
-
_backup_rel_path
= 'backup'¶
-
_bs_instance
= <aiida.manage.backup.backup_setup.BackupSetup object>¶
-
_repo_rel_path
= 'repository'¶
-
-
class
aiida.backends.tests.manage.backup.test_backup_script.
TestBackupScriptUnit
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Unit tests of the Backup classes.
-
__module__
= 'aiida.backends.tests.manage.backup.test_backup_script'¶
-
_json_test_input_1
= '{"backup_length_threshold": 2, "periodicity": 2, "oldest_object_backedup": "2014-07-18 13:54:53.688484+00:00", "end_date_of_backup": null, "days_to_backup": null, "backup_dir": "/scratch/aiida_user/backupScriptDest"}'¶
-
_json_test_input_2
= '{"backup_length_threshold": 2, "periodicity": 2, "oldest_object_backedup": "2014-07-18 13:54:53.688484+00:00", "end_date_of_backup": null, "days_to_backup": null, "backup_dir": "/scratch/aiida_user/backupScriptDest"}'¶
-
_json_test_input_3
= '{"backup_length_threshold": 2, "periodicity": 2, "oldest_object_backedup": "2014-07-18 13:54:53.688484+00:00", "end_date_of_backup": null, "days_to_backup": 2, "backup_dir": "/scratch/aiida_user/backupScriptDest"}'¶
-
_json_test_input_4
= '{"backup_length_threshold": 2, "periodicity": 2, "oldest_object_backedup": "2014-07-18 13:54:53.688484+00:00", "end_date_of_backup": "2014-07-22 14:54:53.688484+00:00", "days_to_backup": null, "backup_dir": "/scratch/aiida_user/backupScriptDest"}'¶
-
_json_test_input_5
= '{"backup_length_threshold": 2, "periodicity": 2, "oldest_object_backedup": "2014-07-18 13:54:53.688484+00:00", "end_date_of_backup": "2014-07-22 14:54:53.688484+00:00", "days_to_backup": 2, "backup_dir": "/scratch/aiida_user/backup"}'¶
-
_json_test_input_6
= '{"backup_length_threshold": 2, "periodicity": 2, "oldest_object_backedup": "2014-07-18 13:54:53.688484", "end_date_of_backup": "2014-07-22 14:54:53.688484", "days_to_backup": null, "backup_dir": "/scratch/./aiida_user////backup//"}'¶
-
check_full_deserialization_serialization
(input_string, backup_inst)[source]¶ Utility function to compare input string with content from Backup classes.
-
test_full_deserialization_serialization_1
()[source]¶ This method tests the correct deserialization / serialization of the variables that should be stored in a file.
-
test_full_deserialization_serialization_2
()[source]¶ This method tests the correct deserialization / serialization of the variables that should be stored in a file.
-
test_full_deserialization_serialization_3
()[source]¶ This method tests the correct deserialization / serialization of the variables that should be stored in a file.
-
test_full_deserialization_serialization_4
()[source]¶ This method tests the correct deserialization / serialization of the variables that should be stored in a file.
-
test_loading_backup_time_params_from_file_1
()[source]¶ This method tests that the _backup_setup_inst limits are correctly loaded from the JSON string and are correctly set.
In the parsed JSON string, no _backup_setup_inst end limits are set
-
test_loading_backup_time_params_from_file_2
()[source]¶ This method tests that the _backup_setup_inst limits are correctly loaded from the JSON string and are correctly set.
In the parsed JSON string, only the daysToBackup limit is set.
-
test_loading_backup_time_params_from_file_3
()[source]¶ This method tests that the _backup_setup_inst limits are correctly loaded from the JSON string and are correctly set.
In the parsed JSON string, only the endDateOfBackup limit is set.
-
test_loading_backup_time_params_from_file_4
()[source]¶ This method tests that the _backup_setup_inst limits are correctly loaded from the JSON string and are correctly set.
In the parsed JSON string, the endDateOfBackup & daysToBackuplimit are set which should lead to an exception.
-
Tests for the backup setup script.
-
class
aiida.backends.tests.manage.backup.test_backup_setup_script.
TestBackupSetupScriptIntegration
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test all of the backup setup script.
-
__module__
= 'aiida.backends.tests.manage.backup.test_backup_setup_script'¶
-
-
class
aiida.backends.tests.manage.backup.test_backup_setup_script.
TestBackupSetupScriptUnit
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Test construction of the backup setup script
-
__module__
= 'aiida.backends.tests.manage.backup.test_backup_setup_script'¶
-