Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1607: test_message.py

File test_message.py, 422 bytes (added by alberto, 5 years ago)
Line 
1from unittest import TestCase
2from formencode.schema import Schema
3from formencode.validators import FancyValidator
4
5class SchemaWithInstance(Schema):
6    a = FancyValidator()
7
8class SchemaWithClass(Schema):
9    a = FancyValidator()
10
11class TestMySchema(TestCase):
12    def test_class(self):
13        SchemaWithInstance.to_python(dict(a="a"))
14   
15    def test_instance(self):
16        SchemaWithClass.to_python(dict(a="a"))
17