I can't get the get_fti and get_behaviors fixtures to work, the underlying queryUtility returns None. I assume this is actually a problem with setting up the test environment, but I think at the least it should document what you need to do to use these fixtures. This is the most minimalist setup I've used to recreate it:
conftest.py
from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING
from pytest_plone import fixtures_factory
pytest_plugins = ["pytest_plone"]
globals().update(
fixtures_factory(
(
(PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING, "functional"),
(PRODUCTS_CMFPLONE_INTEGRATION_TESTING, "integration"),
)
)
)
test_pytest.py
class TestPytest:
def test_fti(self, get_fti):
assert get_fti("Document") is not None
I can't get the get_fti and get_behaviors fixtures to work, the underlying queryUtility returns None. I assume this is actually a problem with setting up the test environment, but I think at the least it should document what you need to do to use these fixtures. This is the most minimalist setup I've used to recreate it:
conftest.py
test_pytest.py