Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/p/t/ptahcms-0.5.1/ptahcms/tests/test_schema.py   ptahcms(Download)
    def test_schema_name_validator(self):
        from ptahcms.interfaces import ContentNameSchema
 
        fieldset = ContentNameSchema.bind(
            params = {'__name__': '/asdfasdfadf'})
 
        fieldset = ContentNameSchema.bind(
            params = {'__name__': 'asdfasdf/adf'})
 
        data, errors = fieldset.extract()
        self.assertTrue(errors)
 
        fieldset = ContentNameSchema.bind(
            params = {'__name__': ' asdfasdfadf'})