Submodules
Unit tests for postgres database maintenance functionality
-
class
aiida.backends.tests.manage.external.test_postgres.
PostgresTest
(methodName='runTest')[source]
Bases: unittest.case.TestCase
Test the public API provided by the Postgres class
-
__module__
= 'aiida.backends.tests.manage.external.test_postgres'
-
_setup_postgres
()[source]
-
setUp
()[source]
Set up a temporary database cluster for testing potentially destructive operations
-
tearDown
()[source]
Hook method for deconstructing the test fixture after testing it.
-
test_create_drop_db
()[source]
Check creating & destroying a database
-
test_create_drop_db_user
()[source]
Check creating and dropping a user works
-
test_determine_setup_fail
()[source]
-
test_determine_setup_success
()[source]
-
test_fallback_on_subcmd
(try_subcmd)[source]
Ensure that accessing postgres via subcommand is tried if psycopg does not work.
-
test_setup_fail_callback
()[source]
Make sure determine_setup works despite wrong initial values in case of correct callback
-
aiida.backends.tests.manage.external.test_postgres.
_try_connect_always_fail
(**kwargs)[source]
Always return False