def test_mailing_list_url_not_found(self): """Test whether it raises an exception when a mailing list is not found""" httpretty.register_uri(httpretty.GET, GMANE_INVALID_LIST_URL, status=200, body="No such list") client = GmaneClient() with self.assertRaises(RepositoryError): client.mailing_list_url('*****@*****.**')
def test_mailing_list_url(self): """Test whether it returns the URL of a mailing list in Gmane""" setup_http_server() client = GmaneClient() url = client.mailing_list_url('*****@*****.**') self.assertEqual(url, GMANE_MYLIST_URL)