[z3-checkins] r22480 - z3/sqlos/trunk/src/sqlos/ftests
jinty at codespeak.net
jinty at codespeak.net
Sat Jan 21 16:10:58 CET 2006
Author: jinty
Date: Sat Jan 21 16:10:56 2006
New Revision: 22480
Modified:
z3/sqlos/trunk/src/sqlos/ftests/containers.txt
Log:
Add a test to be sure that KeyError is raised.
Modified: z3/sqlos/trunk/src/sqlos/ftests/containers.txt
==============================================================================
--- z3/sqlos/trunk/src/sqlos/ftests/containers.txt (original)
+++ z3/sqlos/trunk/src/sqlos/ftests/containers.txt Sat Jan 21 16:10:56 2006
@@ -81,6 +81,13 @@
>>> container[unicode(harry_name)] == harry
True
+Let's test to see what the container does with bad id's (must raise KeyError):
+
+ >>> container['sqlos.somename.SamplePerson.oops']
+ Traceback (most recent call last):
+ ...
+ KeyError: ...
+
You can get() as well:
>>> container.get(harry_name) == harry
More information about the z3-checkins
mailing list