Skip to content

connection

Scope: function | Returns: Connection

The connection fixture yields an open SQLAlchemy connection to the test database, wrapped in a transaction that is committed when the test ends.

Basic usage

Use it with repository classes or raw SQL:

from lime_authentication import LimeUsers

def test_something(connection):
    admin = LimeUsers(connection).get_by_username("admin")