dmaurer wrote:
> This is the test case, I added to
> "ZPublisher.tests.testBaseRequest.TestBaseRequest":
>
> def test_traverse_no_subscription(self):
> class _Object(object): pass
> self.root = _Object()
> r = self.makeBaseRequest()
> from ZPublisher import NotFound
> self.assertRaises(NotFound, r.traverse, 'not_found')
>
> And this is the resulting traceback:
>
> Error in test test_traverse_no_subscription (ZPublisher.tests.testBaseRequest.TestBaseRequest)
> Traceback (most recent call last):
> File "/usr/local/lib/python2.4/unittest.py", line 260, in run
> testMethod()
> File "/home/dieter/G/z211/Base/lib/python/ZPublisher/tests/testBaseRequest.py", line 123, in test_traverse_no_subscription
> self.assertRaises(NotFound, r.traverse, 'not_found')
> File "/usr/local/lib/python2.4/unittest.py", line 320, in failUnlessRaises
> callableObj(*args, **kwargs)
> File "/home/dieter/G/Zope-2.11.0-b1/lib/python/ZPublisher/BaseRequest.py", line 485, in traverse
> File "/home/dieter/G/Zope-2.11.0-b1/lib/python/ZPublisher/BaseRequest.py", line 329, in traverseName
> File "/home/dieter/G/Zope-2.11.0-b1/lib/python/ZPublisher/BaseRequest.py", line 124, in publishTraverse
> TypeError: unsubscriptable object
The attached patch adds that test and a fix: all tests pass after
applying it to the 2.10 branch.
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
dmaurer wrote: tests.testBaseR equest. TestBaseRequest ": no_subscription (self): quest() es(NotFound, r.traverse, 'not_found') no_subscription (ZPublisher. tests.testBaseR equest. TestBaseRequest ) lib/python2. 4/unittest. py", line 260, in run dieter/ G/z211/ Base/lib/ python/ ZPublisher/ tests/testBaseR equest. py", line 123, in test_traverse_ no_subscription es(NotFound, r.traverse, 'not_found') lib/python2. 4/unittest. py", line 320, in failUnlessRaises dieter/ G/Zope- 2.11.0- b1/lib/ python/ ZPublisher/ BaseRequest. py", line 485, in traverse dieter/ G/Zope- 2.11.0- b1/lib/ python/ ZPublisher/ BaseRequest. py", line 329, in traverseName dieter/ G/Zope- 2.11.0- b1/lib/ python/ ZPublisher/ BaseRequest. py", line 124, in publishTraverse
> This is the test case, I added to
> "ZPublisher.
>
> def test_traverse_
> class _Object(object): pass
> self.root = _Object()
> r = self.makeBaseRe
> from ZPublisher import NotFound
> self.assertRais
>
> And this is the resulting traceback:
>
> Error in test test_traverse_
> Traceback (most recent call last):
> File "/usr/local/
> testMethod()
> File "/home/
> self.assertRais
> File "/usr/local/
> callableObj(*args, **kwargs)
> File "/home/
> File "/home/
> File "/home/
> TypeError: unsubscriptable object
The attached patch adds that test and a fix: all tests pass after
applying it to the 2.10 branch.
Tres. ======= ======= ======= ======= ======= ======= ======= ======= ==== palladion. com enigmail. mozdev. org
- --
=======
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iD8DBQFH+ nA9+gerLs4ltQ4R As0mAJ9sHVBmPqA mdisgI1RhT0mArM lrZQCeLB3H HpPilQc3O5zoehK g=
ubuLWo/
=Aw79
-----END PGP SIGNATURE-----