testingzopefixturesdoctestzope3

Loading of initial data before tests in Zope 3


How can I fill database with test data in Zope 3 project? I want this data to be loaded before any tests began (doctest, unit test...), I don't want to load it manually in SetUp methods...Thanks!


Solution

  • Here's a start: http://wiki.zope.org/zope2/TestLayersHowTo/.

    You are looking for test layers; setUp and tearDown for a group of tests, so you can set up your test fixtures for more than one test at a time. Test layers also let you create layers of test fixtures; one layer depending on another.