aiida.control.tests package

Submodules

Unit tests for postgres database maintenance functionality

class aiida.control.tests.test_postgres.PostgresTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test the public API provided by the Postgres class

__module__ = 'aiida.control.tests.test_postgres'
_setup_postgres()[source]
setUp()[source]

Set up a temporary database cluster for testing potentially destructive operations

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(**keywargs)[source]

Ensure that accessing postgres via subcommand is tried if psychopg does not work.

test_setup_fail_callback()[source]

Make sure determine_setup works despite wrong initial values in case of correct callback

aiida.control.tests.test_postgres._try_connect_always_fail(**kwargs)[source]

Always return False