API

Fixture Functions

class pytest_mock_resources.fixture.database.generic.Credentials(drivername, host, port, database, username, password)

Return as pmr_credentials attribute on supported docker-based fixtures.

Examples

It’s also directly dict-able. >>> creds = Credentials(‘d’, ‘l’, ‘p’, ‘baz’, ‘user’, ‘pass’) >>> dict_creds = dict(creds)

as_mongo_kwargs()

Return the valid arguments to a mongo client.

as_psycopg2_kwargs()

Return the valid arguments to sqlalchemy psycopg2.connect.

as_redis_kwargs()

Return the valid arguments to a redis client.

as_sqlalchemy_url()

Return a sqlalchemy sqlalchemy.engine.url.URL.

as_sqlalchemy_url_kwargs()

Return the valid arguments to sqlalchemy sqlalchemy.engine.url.URL.

as_url()

Return a stringified dbapi URL string.

Fixture Config