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

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

src/d/j/django-flanker-0.3.0/django_flanker/validators.py   django-flanker(Download)
    def __call__(self, value):
        validate_email(value)
        value = force_text(value)
 
        if value and address.validate_address(value) is None:

src/d/j/django-flanker-HEAD/django_flanker/validators.py   django-flanker(Download)
    def __call__(self, value):
        validate_email(value)
        value = force_text(value)
 
        if value and address.validate_address(value) is None:

src/f/l/flanker-0.4.14/tests/addresslib/metrics_test.py   flanker(Download)
        mock_method.side_effect = mock_exchanger_lookup
 
        assert_equal(len(address.validate_address('foo@mailgun.net', metrics=True)), 2)
        p, m = address.validate_address('foo@mailgun.net', metrics=True)
        assert_equal('parsing' in m, True)
        assert_equal('mx_lookup' in m, True)
        assert_equal('dns_lookup' in m, True)
        assert_equal('mx_conn' in m, True)
        assert_equal('custom_grammar' in m, True)
        assert_equal(isinstance(address.validate_address('foo@mailgun.org', metrics=False), address.EmailAddress), True)
        assert_equal('custom_grammar' in m, True)
        assert_equal(isinstance(address.validate_address('foo@mailgun.org', metrics=False), address.EmailAddress), True)
        assert_equal(isinstance(address.validate_address('foo@mailgun.org'), address.EmailAddress), True)
 
def test_metrics_validate_list():

src/f/l/flanker-HEAD/tests/addresslib/metrics_test.py   flanker(Download)
        mock_method.side_effect = mock_exchanger_lookup
 
        assert_equal(len(address.validate_address('foo@mailgun.net', metrics=True)), 2)
        p, m = address.validate_address('foo@mailgun.net', metrics=True)
        assert_equal('parsing' in m, True)
        assert_equal('mx_lookup' in m, True)
        assert_equal('dns_lookup' in m, True)
        assert_equal('mx_conn' in m, True)
        assert_equal('custom_grammar' in m, True)
        assert_equal(isinstance(address.validate_address('foo@mailgun.org', metrics=False), address.EmailAddress), True)
        assert_equal('custom_grammar' in m, True)
        assert_equal(isinstance(address.validate_address('foo@mailgun.org', metrics=False), address.EmailAddress), True)
        assert_equal(isinstance(address.validate_address('foo@mailgun.org'), address.EmailAddress), True)
 
def test_metrics_validate_list():

src/f/l/flanker-0.4.14/tests/addresslib/validator_test.py   flanker(Download)
 
            addr = line + '@ai'
            mbox = address.validate_address(addr)
            assert_not_equal(mbox, None)
 
            # domain
            addr = line + '@mailgun.org'
            mbox = address.validate_address(addr)
            # subdomain
            addr = line + '@fakecompany.mailgun.org'
            mbox = address.validate_address(addr)
            assert_not_equal(mbox, None)
 
 
            addr = line + '@ai'
            mbox = address.validate_address(addr)
            assert_equal(mbox, None)
 
            # domain
            addr = line + '@mailgun.org'
            mbox = address.validate_address(addr)

src/f/l/flanker-HEAD/tests/addresslib/validator_test.py   flanker(Download)
 
            addr = line + '@ai'
            mbox = address.validate_address(addr)
            assert_not_equal(mbox, None)
 
            # domain
            addr = line + '@mailgun.org'
            mbox = address.validate_address(addr)
            # subdomain
            addr = line + '@fakecompany.mailgun.org'
            mbox = address.validate_address(addr)
            assert_not_equal(mbox, None)
 
 
            addr = line + '@ai'
            mbox = address.validate_address(addr)
            assert_equal(mbox, None)
 
            # domain
            addr = line + '@mailgun.org'
            mbox = address.validate_address(addr)

src/f/l/flanker-0.4.14/tests/addresslib/plugins/yahoo_test.py   flanker(Download)
    # very simple test that should fail Yahoo! custom grammar
    addr_string = '!mailgun' + DOMAIN
    addr = address.validate_address(addr_string)
    assert_equal(addr, None)
 
        for i in range(4, 33):
            localpart = ''.join(random.choice(string.ascii_letters) for x in range(i))
            addr = address.validate_address(localpart + DOMAIN)
            assert_not_equal(addr, None)
 
        # start must be letter
        for i in string.ascii_letters:
            localpart = str(i) + 'aaa'
            addr = address.validate_address(localpart + DOMAIN)
        for i in string.ascii_letters + string.digits:
            localpart = 'aaa' + str(i)
            addr = address.validate_address(localpart + DOMAIN)
            assert_not_equal(addr, None)
 
        # must be letter, num, and underscore
        for i in string.ascii_letters + string.digits + '_':
            localpart = 'aa' + str(i) + '00'
            addr = address.validate_address(localpart + DOMAIN)

src/f/l/flanker-0.4.14/tests/addresslib/plugins/icloud_test.py   flanker(Download)
    # very simple test that should fail iCloud custom grammar
    addr_string = '!mailgun' + DOMAIN
    addr = address.validate_address(addr_string)
    assert_equal(addr, None)
 
        for i in range(3, 21):
            localpart = ''.join(random.choice(string.ascii_letters) for x in range(i))
            addr = address.validate_address(localpart + DOMAIN)
            assert_not_equal(addr, None)
 
        # start must be letter
        for i in string.ascii_letters:
            localpart = str(i) + 'aa'
            addr = address.validate_address(localpart + DOMAIN)
        for i in string.ascii_letters + string.digits:
            localpart = 'aa' + str(i)
            addr = address.validate_address(localpart + DOMAIN)
            assert_not_equal(addr, None)
 
        # must be letter, num, and underscore
        for i in string.ascii_letters + string.digits + '._':
            localpart = 'aa' + str(i) + '00'
            addr = address.validate_address(localpart + DOMAIN)

src/f/l/flanker-HEAD/tests/addresslib/plugins/yahoo_test.py   flanker(Download)
    # very simple test that should fail Yahoo! custom grammar
    addr_string = '!mailgun' + DOMAIN
    addr = address.validate_address(addr_string)
    assert_equal(addr, None)
 
        for i in range(4, 33):
            localpart = ''.join(random.choice(string.ascii_letters) for x in range(i))
            addr = address.validate_address(localpart + DOMAIN)
            assert_not_equal(addr, None)
 
        # start must be letter
        for i in string.ascii_letters:
            localpart = str(i) + 'aaa'
            addr = address.validate_address(localpart + DOMAIN)
        for i in string.ascii_letters + string.digits:
            localpart = 'aaa' + str(i)
            addr = address.validate_address(localpart + DOMAIN)
            assert_not_equal(addr, None)
 
        # must be letter, num, and underscore
        for i in string.ascii_letters + string.digits + '_':
            localpart = 'aa' + str(i) + '00'
            addr = address.validate_address(localpart + DOMAIN)

src/f/l/flanker-HEAD/tests/addresslib/plugins/icloud_test.py   flanker(Download)
    # very simple test that should fail iCloud custom grammar
    addr_string = '!mailgun' + DOMAIN
    addr = address.validate_address(addr_string)
    assert_equal(addr, None)
 
        for i in range(3, 21):
            localpart = ''.join(random.choice(string.ascii_letters) for x in range(i))
            addr = address.validate_address(localpart + DOMAIN)
            assert_not_equal(addr, None)
 
        # start must be letter
        for i in string.ascii_letters:
            localpart = str(i) + 'aa'
            addr = address.validate_address(localpart + DOMAIN)
        for i in string.ascii_letters + string.digits:
            localpart = 'aa' + str(i)
            addr = address.validate_address(localpart + DOMAIN)
            assert_not_equal(addr, None)
 
        # must be letter, num, and underscore
        for i in string.ascii_letters + string.digits + '._':
            localpart = 'aa' + str(i) + '00'
            addr = address.validate_address(localpart + DOMAIN)

  1 | 2  Next