aiida.backends.tests.common package¶
Submodules¶
Tests for the Archive class.
-
class
aiida.backends.tests.common.test_archive.
TestCommonArchive
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
Tests for the
aiida.common.archive.Archive
class.-
__module__
= 'aiida.backends.tests.common.test_archive'¶
-
-
aiida.backends.tests.common.test_archive.
get_archive_file
(archive)[source]¶ Return the absolute path of the archive file used for testing purposes. The expected path for these files:
aiida.backends.tests.export_import_test_files.migrateParameters: archive – the relative filename of the archive Returns: absolute filepath of the archive test file
Tests for the extended dictionary classes.
-
class
aiida.backends.tests.common.test_extendeddicts.
TestAttributeDictAccess
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Try to access the dictionary elements in various ways, copying (shallow and deep), check raised exceptions.
-
__module__
= 'aiida.backends.tests.common.test_extendeddicts'¶
-
-
class
aiida.backends.tests.common.test_extendeddicts.
TestAttributeDictNested
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Test the functionality of nested AttributeDict classes.
-
__module__
= 'aiida.backends.tests.common.test_extendeddicts'¶
-
-
class
aiida.backends.tests.common.test_extendeddicts.
TestAttributeDictSerialize
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Test serialization/deserialization (with json, pickle, …)
-
__module__
= 'aiida.backends.tests.common.test_extendeddicts'¶
-
-
class
aiida.backends.tests.common.test_extendeddicts.
TestDFAD
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Test for the default fields attribute dictionary.
-
__module__
= 'aiida.backends.tests.common.test_extendeddicts'¶
-
-
class
aiida.backends.tests.common.test_extendeddicts.
TestDFADExample
[source]¶ Bases:
aiida.common.extendeddicts.DefaultFieldsAttributeDict
An example class that has ‘alpha’, ‘beta’ and ‘gamma’ as default keys.
-
__module__
= 'aiida.backends.tests.common.test_extendeddicts'¶
-
_default_fields
= ('alpha', 'beta', 'gamma')¶
-
-
class
aiida.backends.tests.common.test_extendeddicts.
TestFFAD
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Test for the fixed fields attribute dictionary.
-
__module__
= 'aiida.backends.tests.common.test_extendeddicts'¶
-
-
class
aiida.backends.tests.common.test_extendeddicts.
TestFFADExample
(init=None)[source]¶ Bases:
aiida.common.extendeddicts.FixedFieldsAttributeDict
An example class that accepts only the ‘alpha’, ‘beta’ and ‘gamma’ keys/attributes.
-
__module__
= 'aiida.backends.tests.common.test_extendeddicts'¶
-
_valid_fields
= ('alpha', 'beta', 'gamma')¶
-
Tests for the folder class
-
class
aiida.backends.tests.common.test_folders.
FoldersTest
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Tests for the Folder class.
-
__module__
= 'aiida.backends.tests.common.test_folders'¶
-
static
test_create_file_from_filelike_py2
()[source]¶ Test aiida.common.folders.Folder.create_file_from_filelike for python 2.
-
test_create_file_from_filelike_py3
(**kwargs)[source]¶ Test aiida.common.folders.Folder.create_file_from_filelike for python 3.
-
-
aiida.backends.tests.common.test_folders.
fs_encoding_is_utf8
()[source]¶ Returns: True if the current filesystem encoding is set to UTF-8
Unittests for aiida.common.hashing:make_hash with hardcoded hash values
-
class
aiida.backends.tests.common.test_hashing.
MakeHashTest
(methodName='runTest')[source]¶ Bases:
unittest2.case.TestCase
Tests for the make_hash function.
-
__module__
= 'aiida.backends.tests.common.test_hashing'¶
-
-
class
aiida.backends.tests.common.test_hashing.
PasswordFunctions
(methodName='runTest')[source]¶ Bases:
unittest2.case.TestCase
Tests for the password hashing functions.
-
__module__
= 'aiida.backends.tests.common.test_hashing'¶
-
-
class
aiida.backends.tests.common.test_hashing.
TruncationTest
(methodName='runTest')[source]¶ Bases:
unittest2.case.TestCase
Tests for the truncate_* methods
-
__module__
= 'aiida.backends.tests.common.test_hashing'¶
-
Tests for the logging module.
-
class
aiida.backends.tests.common.test_logging.
TestLogger
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Test global python logging module.
-
__module__
= 'aiida.backends.tests.common.test_logging'¶
-
Serialization tests
-
class
aiida.backends.tests.common.test_serialize.
TestSerialize
(methodName='runTest')[source]¶ Bases:
aiida.backends.testbase.AiidaTestCase
-
__module__
= 'aiida.backends.tests.common.test_serialize'¶
-
test_serialize_group
()[source]¶ Test that serialization and deserialization of Groups works. Also make sure that the serialized data is json-serializable
-
Tests for the timezone utility module.
-
class
aiida.backends.tests.common.test_timezone.
TimezoneTest
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Tests for the timezone utility module.
-
__module__
= 'aiida.backends.tests.common.test_timezone'¶
-
Tests for the aiida.common.utils functionality
-
class
aiida.backends.tests.common.test_utils.
PrettifierTest
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Tests for the Prettifier class methods.
-
__module__
= 'aiida.backends.tests.common.test_utils'¶
-
-
class
aiida.backends.tests.common.test_utils.
SqlStringMatchTest
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
” Test the functions to convert SQL to regex patterns
-
__module__
= 'aiida.backends.tests.common.test_utils'¶
-
-
class
aiida.backends.tests.common.test_utils.
UniqueTest
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Tests for the get_unique_filename function.
-
__module__
= 'aiida.backends.tests.common.test_utils'¶
-
seq
= -1¶
-
test_ask_backup_question
()[source]¶ This method checks that the combined use of query_string and query_yes_no by the ask_backup_question is done as expected.
-