'Link to an external page with caption.'

def test_link_caption(self):

    img_div = pq_img(self.p, '[[Image:test.jpg|link=http://ab.us|frame|caption]]', 'div.img')
    img = img_div('img')
    img_a = img_div('a')
    eq_(self.img.file.url, img.attr('src'))
    eq_('http://ab.us', img_a.attr('href'))
