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

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

src/p/r/Products.validation-2.0/Products/validation/tests/test_validation.py   Products.validation(Download)
        self.failUnlessEqual(v('fish://tiran:password@myserver/~/'), 1)
        self.failUnlessEqual(v('http://\n'), u"Validation failed(isURL): 'http://\n' is not a valid url.")
        self.failIfEqual(v('../foo/bar'), 1)
 
    def test_isEmail(self):
        v = validation.validatorFor('isEmail')
        self.failUnlessEqual(v('test@test.com'), 1)
        self.failIfEqual(v('@foo.bar'), 1)
    def test_isMailto(self):
        v = validation.validatorFor('isMailto')
        self.failUnlessEqual(v('mailto:test@test.com'), 1)
        self.failIfEqual(v('test@test.com'), 1)
        self.failIfEqual(v('mailto:@foo.bar'), 1)
        self.failIfEqual(v('@foo.bar'), 1)

src/p/r/Products.DigestoContentTypes-1.2a1/Products/DigestoContentTypes/tests/test_validators.py   Products.DigestoContentTypes(Download)
        v = validation.validatorFor('is_address_book')
        self.failUnlessEqual(v(valid_address_book), 1)
        self.failIfEqual(v(invalid_address_book1), 1)
        self.failIfEqual(v(invalid_address_book2), 1)
        self.failIfEqual(v(invalid_address_book3), 1)
        self.failIfEqual(v(invalid_address_book4), 1)
        v = validation.validatorFor('is_dossier_number_list')
        self.failUnlessEqual(v(valid_dossier_numbers), 1)
        self.failIfEqual(v(invalid_dossier_numbers1), 1)
        self.failIfEqual(v(invalid_dossier_numbers2), 1)
        self.failIfEqual(v(invalid_dossier_numbers3), 1)

src/p/r/Products.DataGridField-1.9.0/Products/DataGridField/tests/testValidators.py   Products.DataGridField(Download)
        self.failUnlessEqual(v((0, 1)), 1)
        self.failUnlessEqual(v([0, 1]), 1)
        self.failIfEqual(v([1]), 1)
        self.failIfEqual(v(0), 1)