[Zope3-checkins]
SVN: Zope3/branches/jim-adapter/src/bugtracker/tests/test_vocabularies.py
Check for correct exception raised now that NotFoundError is
no longer
Philipp von Weitershausen
philikon at philikon.de
Tue Apr 4 12:01:27 EDT 2006
Log message for revision 66398:
Check for correct exception raised now that NotFoundError is no longer
there and checking for KeyError was deprecated anyways.
Changed:
U Zope3/branches/jim-adapter/src/bugtracker/tests/test_vocabularies.py
-=-
Modified: Zope3/branches/jim-adapter/src/bugtracker/tests/test_vocabularies.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/tests/test_vocabularies.py 2006-04-04 15:56:58 UTC (rev 66397)
+++ Zope3/branches/jim-adapter/src/bugtracker/tests/test_vocabularies.py 2006-04-04 16:01:26 UTC (rev 66398)
@@ -27,7 +27,7 @@
from zope.app.annotation.attribute import AttributeAnnotations
from zope.app.annotation.interfaces import IAnnotations, IAttributeAnnotatable
from zope.app.container.contained import contained, Contained
-from zope.app.security.interfaces import IAuthentication
+from zope.app.security.interfaces import IAuthentication, PrincipalLookupError
from zope.app.security.principalregistry import principalRegistry, Principal
from bugtracker.interfaces import IManagableVocabulary
@@ -226,13 +226,13 @@
def test_getTerm(self):
self.assertEqual(self.vocab.getTerm('1').value, '1')
self.assertEqual(self.vocab.getTerm('1').principal['login'], 'one')
- self.assertRaises(KeyError, self.vocab.getTerm, ('3',))
+ self.assertRaises(PrincipalLookupError, self.vocab.getTerm, ('3',))
def test_getTermByToken(self):
vocab = self.vocab
self.assertEqual(vocab.getTermByToken('1').value, '1')
self.assertEqual(vocab.getTermByToken('1').principal['login'], 'one')
- self.assertRaises(KeyError, vocab.getTermByToken, ('3',))
+ self.assertRaises(PrincipalLookupError, vocab.getTermByToken, ('3',))
class SampleVocabulary(ManagableVocabulary):
More information about the Zope3-Checkins
mailing list