'Facebook field has the correct pattern attribute.'

def test_facebook_pattern_attr(self):

    fragment = pq(self.form.as_ul())
    facebook = fragment('#id_facebook')[0]
    assert ('pattern' in facebook.attrib)
    pattern = re.compile(facebook.attrib['pattern'])
    for (url, match) in FACEBOOK_URLS:
        eq_(bool(pattern.match(url)), match)
