def test_redirect(): p = Patu(urls=['www.djangoproject.com']) r = p.get_urls(MockHttp(), 'http://www.djangoproject.com/offsite_redirect') eq_(r.url, 'http://www.djangoproject.com/offsite_redirect') eq_(r.links, []) eq_(r.status_code, 200)
def test_parse_html(): p = Patu(urls=[TEST_URL]) r = p.get_urls(MockHttp(), TEST_URL) eq_(r.links, LINKS)