Re: how to get tests passing for Plone 5
"David Glick (Plone)" <david.glick-z4DKO/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <[email protected]> |
On 8/28/13 10:26 AM, Timo Stollenwerk wrote: > Am 22.08.2013 21:09, schrieb David Glick (Plone): >> Okay, here's the deal with Plone 5: there is a branch started (5.0 >> branch of buildout.coredev) which uses plone.app.contenttypes as the >> default content type system. But there are a lot of tests which are >> breaking because they assume that the default content types are >> Archetypes-based. >> (http://jenkins.plone.org/job/plone-5.0-python-2.7/lastCompletedBuild/testReport/) >> I could really use some help getting these fixed. >> >> A large part of this is making sure that tests are using layers based on >> the correct fixture. At present the fixtures that we can choose from are: >> 1. PLONE_FIXTURE from plone.app.testing. As of Plone 5 this no longer >> installs a content type system, so it's only appropriate for tests that >> don't use content types. >> 2. PLONE_APP_CONTENTTYPES_FIXTURE from plone.app.contenttypes. This >> extends PLONE_FIXTURE and adds the plone.app.contenttypes profile, >> adding Dexterity-based core content types. Tests of Dexterity-based >> content should use this. > The PLONE_APP_CONTENTTYPES_FIXTURE sets the default workflow chain to > simple_publication_workflow and does some other minor stuff that we > might want to remove: > > https://github.com/plone/plone.app.contenttypes/blob/master/plone/app/contenttypes/testing.py#L35 > > I have some tests in plone.app.discussion that fail because of this > "change". I'd guess that it was a conscious design decision to not > provide a default workflow in tests for ATContentTypes (performance? > simplicity?). > > I would like to hear some opinions about if we want to remove that > setting (and have the same behavior as with the current testing setup) > or if we want to change that. > > Personally I almost always set a default workflow in the test setUp, so > I wouldn't mind to include it. If there are good reasons to keep it out > I'd be happy to remove it though. > I never really understood why PLONE_FIXTURE doesn't set a default workflow. For integration and functional tests it seems to me that it's best if things behave the same in tests as they do in a real Plone site. Martin, am I missing something? ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk