API¶
- class sqla_fix_fact.SqlaFixFact(db_session)¶
Fixture factory manager
- sqla_fix_fact.subFactoryGet(fixture, **kwargs)¶
To be used in fixture definition (or in the kwargs of the fixture constructor) to reference a other fixture using the BaseFix.get() method.
Parameters: - fixture – Desired fixture
- kwargs – Optional: key words to overwrite properties of this fixture
Returns: Proxy object for the desired fixture including the altered properties
- sqla_fix_fact.subFactoryCreate(fixture, **kwargs)¶
To be used in fixture definition (or in the kwargs of the fixture constructor) to reference a other fixture using the BaseFix.create() method.
Parameters: - fixture – Desired fixture
- kwargs – Optional: key words to overwrite properties of this fixture
Returns: Proxy object for the desired fixture including the altered properties
- sqla_fix_fact.subFactoryModel(fixture, **kwargs)¶
To be used in fixture definition (or in the kwargs of the fixture constructor) to reference a other fixture using the BaseFix.model() method.
Parameters: - fixture – Desired fixture
- kwargs – Optional: key words to overwrite properties of this fixture
Returns: Proxy object for the desired fixture including the altered properties
- class sqla_fix_fact.BaseFix(fix_fact, **kwargs)¶
Parameters: - fix_fact – instance of SqlaFixFact
- kwargs – Optional: key words to overwrite properties of this fixture
- create()¶
Adds this model to the session. This instance is not registered and thus can never be referred to via get
Returns: SQLAlchemy Model instance
- get()¶
returns an already existing model instance or creates one, registers it to be able to find it later and then returns the instance
Returns: SQLAlchemy Model instance
- model()¶
Returns a model instance of this fixture which is ready to be added. The model itself is not added to the DB but all dependencies are.
Returns: SQLAlchemy Model instance