def test_wrong_rel(self, get): get.side_effect = lambda *args: self.get_response(['test', "internal"], ['../'], ['test']) self.assertEqual(get_urls('package'), set([]))
def test_duplicate_urls(self, get): get.side_effect = lambda *args: self.get_response( ['test', "homepage"], ['../'], ['test', "download"]) self.assertEqual(get_urls('package'), {'test'})
def test_homepage_link(self, get): get.side_effect = lambda *args: self.get_response(['test', "homepage"], ['../']) self.assertEqual(get_urls('package'), {'test'})
def test_wrong_rel(self, get): get.side_effect = lambda *args: self.get_response( ['test', "internal"], ['../'], ['test']) self.assertEqual(get_urls('package'), set([]))
def test_homepage_link(self, get): get.side_effect = lambda *args: self.get_response( ['test', "homepage"], ['../']) self.assertEqual(get_urls('package'), {'test'})