Author: ianb
Date: 2008-05-13 17:02:17 -0600 (Tue, 13 May 2008)
New Revision: 3421

Modified:
   FormEncode/trunk/tests/test_schema.py
Log:
Test chained validator with no input to the schema (trying to reproduce SF bug 
1939813)

Modified: FormEncode/trunk/tests/test_schema.py
===================================================================
--- FormEncode/trunk/tests/test_schema.py       2008-05-13 22:55:26 UTC (rev 
3420)
+++ FormEncode/trunk/tests/test_schema.py       2008-05-13 23:02:17 UTC (rev 
3421)
@@ -160,8 +160,14 @@
                             validators.FieldsMatch('b', 'b_confirm')]
 
 def test_multiple_chained_validators_errors():
+    s = ChainedTest()
     try:
-        s = ChainedTest()
         s.to_python({'a':'1', 'a_confirm':'2', 'b':'3', 'b_confirm':'4'})
     except Invalid, e:
         assert(e.error_dict.has_key('a_confirm') and 
e.error_dict.has_key('b_confirm'))
+    try:
+        s.to_python({})
+    except Invalid, e:
+        pass
+    else:
+        assert 0


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
FormEncode-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs

Reply via email to