fixtures.db module


Fixture providing utils.db.cfmedb

This is an SQLalchemy-based helper class which provides access to common database functions.

See also session.


# This example gets vm names and hostnames from the ext_management_systems table.
def test_that_tries_for_db(db):
    ems_table = db['ext_management_systems']
    for instance in db.session.query(ems_table.order_by(
        assert, instance.hostname

This fixture is module scoped to ensure predictable database access at the module level within tests.


Returns a mapping of database yaml names to the yaml contents serialized in python