Skip to content
This repository was archived by the owner on Mar 8, 2021. It is now read-only.
This repository was archived by the owner on Mar 8, 2021. It is now read-only.

InstallAndSave builder should allow deferring transaction commit #57

@bijanvakili

Description

@bijanvakili

The default SQLAlchemy builder (InstallAndSave) commits the session on each individual fixture.

In some cases, it may be more desirable to allow all fixtures to be instantiated added to the session before committing the entire session. For example, if any semantic error occurs (valid YAML, but invalid for the SQLAlchemy model), the application may wish to roll back all fixture changes rather than commit partial data.

This could be done by adding a autocommit boolean kwarg to the __call__ method that would skip this session commit call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions