API

All relevant code is placed in factories submodule

Pytest’s fixture factories.

pytest_pyramid.factories.pyramid_app(config_fixture_name)[source]

pyramid_app fixture factory.

Creates a TestApp instance based on.

Parameters:config_fixture_name (str) – name of a fixture creating pyramid.config.Configurator
Returns:TestApp based on pyramid’s COnfigurator object as returned from fixture passed by config_fixture_name
Return type:webtest.app.TestApp
pytest_pyramid.factories.pyramid_config(settings=None, config_path=None)[source]

Pyramid_config fixture factory.

Used to create aditional fixtures returning pyramid’s Configurator object.

Parameters:
  • settings (dict) – optional parameter delivering settings for building a Configurator object.
  • config_path (str) – optional parameter delivering path to pyramid configuration file
Returns:

configuration

Return type:

pyramid.config.Configurator