[Zope-dev] Problem testing CatalogAware class

Vincenzo Di Somma e.disomma@icube.it
07 Jun 2002 11:08:36 +0200


--=-lhE38JC57U8CpvAr22x+
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi all,
does someone knows about problems testing CatalogAware subclasses ?
I have unit tests for my class and work well, but if I subclass also
from CatalogAware I receive:

  File "/usr/lib/zope/lib/python/OFS/ObjectManager.py", line 267, in
_setObject
    object.manage_afterAdd(object, self)
  File "/usr/lib/zope/lib/python/Products/ZCatalog/CatalogAwareness.py",
line 42, in manage_afterAdd
    self.index_object()
  File "/usr/lib/zope/lib/python/Products/ZCatalog/CatalogAwareness.py",
line 112, in index_object
    getattr(self, self.default_catalog).catalog_object(self, self.url())
  File "/usr/lib/zope/lib/python/Products/ZCatalog/CatalogAwareness.py",
line 85, in url
    else: url=3Dself.absolute_url()
  File "/usr/lib/zope/lib/python/OFS/Traversable.py", line 48, in
absolute_url
    return join([req['SERVER_URL']] + req._script + path, '/')
KeyError: SERVER_URL

Suggestions?

Thanks,
	Vincenzo.
--=20
Vincenzo Di Somma - Responsabile Ricerca e Sviluppo - Icube S.r.l.
Sede:   Via Ridolfi 15 - 56124 Pisa (PI), Italia
E-mail: e.disomma@icube.it              WWW: www.icube.it
Tel:    (+39) 050 97 02 07              Fax: (+39) 050 31 36 588

--=-lhE38JC57U8CpvAr22x+
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

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

iD8DBQA9AHgU3Kk7Hs2J//MRAqKeAJ9nXMT1382bWFGP56aEraJv3qsVFwCeMk+o
P1NlZCWpvmxwCOW8umIS5k0=
=9R7+
-----END PGP SIGNATURE-----

--=-lhE38JC57U8CpvAr22x+--