def title_eq(url, alt, text): response = self.client.get(url, follow=True) doc = PyQuery(response.content) assert alt == doc('.site-title img').attr('alt') assert text == doc('.site-title').text()
def test_login_link(self): r = self.client.get(reverse('home'), follow=True) doc = PyQuery(r.content) next = urllib.urlencode({'to': '/en-US/firefox/'}) assert '/en-US/firefox/users/login?%s' % next == ( doc('.account.anonymous a')[1].attrib['href'])
def title_eq(url, alt, text): response = self.client.get(url, follow=True) doc = PyQuery(response.content) eq_(alt, doc('.site-title img').attr('alt')) eq_(text, doc('.site-title').text())