Fixtures

lime-test is implemented as a plugin to pytest, which means that as soon as it’s installed, it will contain fixtures to be used to set up the conditions for your tests more quickly. These fixtures are more often than not to be considered a starting point, and you’ll most likely find yourself in need of more fine grained control over your test setups.

To use a fixture in your tests, do this:

def test_my_app(core_app):
    uow = core_app.unit_of_work()
    uow.add(core_app.limetypes.company(name='acme'))
    uow.commit()

    assert len(list(core_app.limetypes.company.get_all())) == 1

Available Fixtures