Submodules
Unit tests for the ORM Backend class.
-
class
aiida.backends.tests.orm.implementation.test_backend.
TestBackend
(methodName='runTest')[source]
Bases: aiida.backends.testbase.AiidaTestCase
Test backend.
-
__module__
= 'aiida.backends.tests.orm.implementation.test_backend'
-
test_store_in_transaction
()[source]
Test that storing inside a transaction is correctly dealt with.
-
test_transaction
()[source]
Test that transaction nesting works.
-
test_transaction_nesting
()[source]
Test that transaction nesting works.
Unit tests for the BackendComment and BackendCommentCollection classes.
Bases: aiida.backends.testbase.AiidaTestCase
Test BackendComment.
Create BackendComment
Hook method for setting up the test fixture before exercising it.
Hook method for setting up class fixture before running tests in the class.
Test creation of a BackendComment and all its properties.
Test creation of a BackendComment when passing the mtime and the ctime. The passed ctime and mtime
should be respected since it is important for the correct import of nodes at the AiiDA import/export.
Test delete method
Test delete_all method
Test delete_many method filtering on ctime and mtime
Test delete_many method filtering on dbnode_id
Test delete_many method filtering on both id and uuid
Test delete_many method with empty filters
Test no exception is raised when entity is filtered by both id and uuid
Test delete_many method filtering on user_id
Test TypeError is raised when filters is wrong type
Test TypeError is raised when filters is wrong type
Test deleting non-existent Comments for different cases
Unit tests for the BackendLog and BackendLogCollection classes.
-
class
aiida.backends.tests.orm.implementation.test_logs.
TestBackendLog
(methodName='runTest')[source]
Bases: aiida.backends.testbase.AiidaTestCase
Test BackendLog.
-
__module__
= 'aiida.backends.tests.orm.implementation.test_logs'
-
create_log
(**kwargs)[source]
Create BackendLog
-
setUp
()[source]
Hook method for setting up the test fixture before exercising it.
-
classmethod
setUpClass
(*args, **kwargs)[source]
Hook method for setting up class fixture before running tests in the class.
-
test_creation
()[source]
Test creation of a BackendLog and all its properties.
-
test_creation_with_static_time
()[source]
Test creation of a BackendLog when passing the mtime and the ctime. The passed ctime and mtime
should be respected since it is important for the correct import of nodes at the AiiDA import/export.
-
test_delete
()[source]
Test delete method
-
test_delete_all
()[source]
Test delete_all method
-
test_delete_many_dbnode_id
()[source]
Test delete_many method filtering on dbnode_id
-
test_delete_many_ids
()[source]
Test delete_many method filtering on both id and uuid
-
test_delete_many_no_filters
()[source]
Test delete_many method with empty filters
-
test_delete_many_same_twice
()[source]
Test no exception is raised when entity is filtered by both id and uuid
-
test_delete_many_time
()[source]
Test delete_many method filtering on time
-
test_delete_many_wrong_type
()[source]
Test TypeError is raised when filters is wrong type
-
test_delete_wrong_type
()[source]
Test TypeError is raised when filters is wrong type
-
test_deleting_non_existent_entities
()[source]
Test deleting non-existent Logs for different cases
Unit tests for the BackendNode and BackendNodeCollection classes.
-
class
aiida.backends.tests.orm.implementation.test_nodes.
TestBackendNode
(methodName='runTest')[source]
Bases: aiida.backends.testbase.AiidaTestCase
Test BackendNode.
-
__module__
= 'aiida.backends.tests.orm.implementation.test_nodes'
-
create_node
()[source]
-
setUp
()[source]
Hook method for setting up the test fixture before exercising it.
-
classmethod
setUpClass
(*args, **kwargs)[source]
Hook method for setting up class fixture before running tests in the class.
-
test_attribute_flush_specifically
()[source]
Test that changing attributes only flushes that property and does not affect others like extras.
Regression fix for #3338
-
test_attribute_items
()[source]
Test the BackendNode.attribute_items generator.
-
test_attribute_keys
()[source]
Test the BackendNode.attribute_keys generator.
-
test_attributes
()[source]
Test the BackendNode.attributes property.
-
test_clear_attributes
()[source]
Test the BackendNode.clear_attributes method.
Test the BackendNode.clear_extras method.
-
test_clone
()[source]
Test the clone method.
-
test_computer_methods
()[source]
Test the computer methods of a BackendNode.
-
test_creation
()[source]
Test creation of a BackendNode and all its properties.
-
test_creation_with_time
()[source]
Test creation of a BackendNode when passing the mtime and the ctime. The passed ctime and mtime
should be respected since it is important for the correct import of nodes at the AiiDA import/export.
-
test_delete_attribute
()[source]
Test the BackendNode.delete_attribute method.
-
test_delete_attribute_many
()[source]
Test the BackendNode.delete_attribute_many method.
Test the BackendNode.delete_extra method.
Test the BackendNode.delete_extra_many method.
Test that changing extras only flushes that property and does not affect others like attributes.
Regression fix for #3338
Test the BackendNode.extra_items generator.
Test the BackendNode.extra_keys generator.
Test the BackendNode.extras property.
-
test_get_attribute
()[source]
Test the BackendNode.get_attribute method.
-
test_get_attribute_many
()[source]
Test the BackendNode.get_attribute_many method.
Test the BackendNode.get_extra method.
Test the BackendNode.get_extra_many method.
-
test_get_set_attribute
()[source]
Test the get_attribute and set_attribute method of a BackendNode.
Test the get_extras and set_extras method of a BackendNode.
-
test_mtime
()[source]
Test the mtime is automatically updated when a database field is updated.
-
test_property_setters
()[source]
Test the property setters of a BackendNode.
-
test_reset_attributes
()[source]
Test the BackendNode.reset_attributes method.
Test the BackendNode.reset_extras method.
-
test_set_attribute
()[source]
Test the BackendNode.set_attribute method.
-
test_set_attribute_many
()[source]
Test the BackendNode.set_attribute_many method.
Test the BackendNode.set_extra method.
Test the BackendNode.set_extra_many method.
-
test_user_methods
()[source]
Test the user methods of a BackendNode.