[Zope3-dev] functional testing ugliness

Marius Gedminas mgedmin@centras.lt
Fri, 1 Aug 2003 13:10:00 +0300


--ADZbWkCsHQ7r3kzd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Aug 01, 2003 at 04:34:26PM +1000, Anthony Baxter wrote:
> We're writing some functional tests for the Catalog, and ran across a
> really unpleasant bug (or at least wart) in the functional testing.
>=20
> As part of the testing of adding, we have code like this:
>=20
>     response =3D self.publish("/felix_the/+/AddFieldIndexToCatalog=3Ddcti=
tle",
> 		    basic=3D'mgr:mgrpw',=20
> 		    form=3D{'field.interface.search':=20
> 			  u'zope.app.interfaces.dublincore.IZopeDublinCore',
> 			  'field.field_name':'Title'})
>=20
> Initially we had the URL as "/felix_the/+/AddFieldIndexToCatalog%3Ddctitl=
e"
> (snarfed out of a browser), and this led to an infinite recursion in the
> publishing code when running the tests.

If you type the following URL to the browser, you will see the same
RuntimeError:

  felix_the/+/AddFieldIndexToCatalog%2E3Ddctitle

Functional testing code passes the URL to the publisher as-is, without
doing any URL decoding that is done by the HTTP server code, that's why
it exposed this bug.

Marius Gedminas
--=20
If you are good, you will be assigned all the work.  If you are real
good, you will get out of it.

--ADZbWkCsHQ7r3kzd
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/Kjx4kVdEXeem148RAjHFAKCNwZEINcFQ3nH2tlYuSmyvmr3tKgCcCYAu
JEpQhULECbkpvtsLOywinC4=
=fS3J
-----END PGP SIGNATURE-----

--ADZbWkCsHQ7r3kzd--