On 03/24/2010 10:57 AM, Josh Johnson wrote:
I can't seem to make comments on the issue in the tracker ATM, but I
take issue with the attached. I think default tests created by default
templates should assume default plone, and there's nothing wrong with that.

I don't think it's too much to ask someone to change a test to fit their
needs after the code is generated.

Doctests are fragile beasts to start with. When applying a theme to a site it is pretty common to kill your browser tests.

The solution that was proposed still uses default Plone. The suggestion is just to go to a known working place to login in a Plone site instead of a moving target.

I'm +1 on that change.

Clayton
--
clay...@sixfeetup.com | +1 (317) 861-5948 x603
six feet up presents INDIGO : The Help Line for Plone
More info at http://sixfeetup.com/indigo or call +1 (866) 749-3338




IMHO, tests should fail if assumptions aren't meant, and that's totally
OK. I think its a mistake to want the generated tests to pass by default
and it's especially bad do anything that is dissimilar to what a normal
user does to make them pass.

JJ

Begin forwarded message:

*From: *"plone.org Administrator" <disc...@antiloop.plone.org
<mailto:disc...@antiloop.plone.org>>
*Date: *March 24, 2010 5:24:34 AM EDT
*To: *zopes...@lists.plone.org <mailto:zopeskel@lists.plone.org>
*Subject: **[Zopeskel] [ZopeSkel Issue Tracker] #40 - New issue:
[patch, trivial] archetypes browser tests depend on login_portlet*
*Reply-To: *Zopeskel Users and Developers <zopeskel@lists.plone.org
<mailto:zopeskel@lists.plone.org>>

A new issue has been submitted to the *Issue tracker* tracker by
*Guido Stevens* and awaits confirmation.


        Issue Information

Issue
    [patch, trivial] archetypes browser tests depend on login_portlet
    (http://plone.org/products/zopeskel/issues/40)

*Issue Details*:

The boilerplate browser tests generated by

# paster create -t archetype

and by

# paster addcontent contenttype

use the login portlet on the home page to log in to the site.



This is not a problem when performing stand-alone tests of the
content type package.



However, browser tests are integration tests, and when combining
the content type package with, say, a theme package that hides the
login portlet on the home page,

then running a combined test

# bin/instance test -s my.contenttype -s my.theme

     ...

     LookupError: name '__ac_name'



The fix is simple: use the dedicated /login_form to log into the
site. See attached diffs.



I don't have a ZopeSkel development sandbox, don't know how to
test such a "meta" package -- but have implemented and verified
this fix in my own content type package.

    * This is an automated email, please do not reply - plone.org
      Administrator

_______________________________________________
ZopeSkel mailing list
ZopeSkel@lists.plone.org <mailto:ZopeSkel@lists.plone.org>
http://lists.plone.org/mailman/listinfo/zopeskel



_______________________________________________
ZopeSkel mailing list
ZopeSkel@lists.plone.org
http://lists.plone.org/mailman/listinfo/zopeskel

_______________________________________________
ZopeSkel mailing list
ZopeSkel@lists.plone.org
http://lists.plone.org/mailman/listinfo/zopeskel

Reply via email to