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

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

src/d/j/django-flanker-HEAD/django_flanker/validators.py   django-flanker(Download)
 
        if value and address.validate_address(value) is None:
            suggestion = validate.suggest_alternate(value)
            if suggestion:
                raise ValidationError(self.message_typo, code=self.code_typo,

src/d/j/django-flanker-0.3.0/django_flanker/validators.py   django-flanker(Download)
 
        if value and address.validate_address(value) is None:
            suggestion = validate.suggest_alternate(value)
            if suggestion:
                raise ValidationError(self.message_typo, code=self.code_typo,

src/d/j/django-flanker-HEAD/tests/test_suite.py   django-flanker(Download)
    def test_form_invalid_suggest(self):
        bad_email = 'derek.payton@gmial.com'
        suggestion = validate.suggest_alternate(bad_email)
        form = EmailForm({'email': bad_email})
        assert form.is_valid() is False

src/f/l/flanker-HEAD/tests/addresslib/corrector_test.py   flanker(Download)
        test_str = 'username@' + parts[0]
        corr_str = 'username@' + parts[1]
        sugg_str = validate.suggest_alternate(test_str)
 
        if sugg_str == corr_str:
 
        test_str = 'username@' + line
        sugg_str = validate.suggest_alternate(test_str)
 
        if sugg_str == None:
 
            mstr = 'username@' + generate_mutated_string(domain, i)
            sugg_str = validate.suggest_alternate(mstr)
            if sugg_str == orig_str:
                sugg_correct += 1
 
            lstr = 'username@' + generate_longer_string(domain, i)
            sugg_str = validate.suggest_alternate(lstr)
            if sugg_str == orig_str:
                sugg_correct += 1
 
            sstr = 'username@' + generate_shorter_string(domain, i)
            sugg_str = validate.suggest_alternate(sstr)
            if sugg_str == orig_str:
                sugg_correct += 1

src/f/l/flanker-0.4.14/tests/addresslib/corrector_test.py   flanker(Download)
        test_str = 'username@' + parts[0]
        corr_str = 'username@' + parts[1]
        sugg_str = validate.suggest_alternate(test_str)
 
        if sugg_str == corr_str:
 
        test_str = 'username@' + line
        sugg_str = validate.suggest_alternate(test_str)
 
        if sugg_str == None:
 
            mstr = 'username@' + generate_mutated_string(domain, i)
            sugg_str = validate.suggest_alternate(mstr)
            if sugg_str == orig_str:
                sugg_correct += 1
 
            lstr = 'username@' + generate_longer_string(domain, i)
            sugg_str = validate.suggest_alternate(lstr)
            if sugg_str == orig_str:
                sugg_correct += 1
 
            sstr = 'username@' + generate_shorter_string(domain, i)
            sugg_str = validate.suggest_alternate(sstr)
            if sugg_str == orig_str:
                sugg_correct += 1