For the most basic usage pytest_pyramid provides a pyramid_app and pyramid_config fixtures, that can be used to test your pyramid app. Simply pass your pyramid config *.ini file to –pc command line option, and include pytest_app fixture into your test suite to be able to use it for integration tests.
pytest_pyramid provides two fixtures to be used in pytest tests:
- pyramid_config - fixture providing pyramid’s Configurator instance as
- defined in pyramid config’s file
- pyramid_app - pyramid application for testing - a
Both of these fixtures depend on Config file passed in command line.
If you’re developing a module, package meant to extend functionalities of other
applications, it’s not necessary to create a full blown application to test
functionalities provided in packages. To do this, pytest_pyramid provides
you with fixture
There are two factories: