-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Martijn Pieters wrote: > Martijn Pieters wrote: > >>The error occurs in Products/Five/tests/forms.txt, which means it needs >>to be fixed in the Five repository, not in the Zope repository (at >>least not permanently). Indeed nearly all the functional tests there >>set handle_errors=False, which can be dropped to handle this situation >>better. Alternatively the test can be altered to expect a Traceback ... >>Unauthorized. > > > I see you already checked in a fix to the Five codebase, but because you > didn't propagate this to the Zope codebase the test fails there. I > checked in a fix there before I learned of you Five checkin. Here is my > patch, which changes the test to expect Unauthorized to be raised: > > --- lib/python/Products/Five/tests/forms.txt (revision 38617) > +++ lib/python/Products/Five/tests/forms.txt (working copy) > @@ -36,8 +36,9 @@ > ... GET /test_folder_1_/ftf/+/protectedaddform.html HTTP/1.1 > ... Authorization: Basic viewer:secret > ... """, handle_errors=False) > - HTTP/1.1 401 Unauthorized > + Traceback (most recent call last): > ... > + Unauthorized: ... > > Now let's add a piece of our sample content object to test more things > on it: > > This is the direct opposite of your fix in the Five codebase, where you > removed the handle_errors=False flag instead. I assumed the keyword was > there for a reason (propagate unexpected exceptions during testing?) so > I used the Traceback approach instead. > > Do the Five ppl want this approach instead? If not, just ignore my change > to the Zope codebase and have a future version of Five overwrite it.
I'm fine with either way; 'handle_errors=False' is a signal (to me, anyway) that the test is more a "unit test" (which cares about exceptions for edge cases) than a "functional" test (which cares that appropriate error pages are returned to the users). Feel free to port your change to the Five/branch/Five-1.1 and Five/trunk, AFAIAC. Tres. - -- =================================================================== Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDOYG5+gerLs4ltQ4RAkdcAJ0SdXOZey8GaJ7aX43ruUIYFI+oyACbBr0Z HdzWV/cYGVd8ExSe72G7zNA= =OAf4 -----END PGP SIGNATURE----- _______________________________________________ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders