Ejemplo n.º 1
0
    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('*****@*****.**')
Ejemplo n.º 2
0
    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('*****@*****.**')
Ejemplo n.º 3
0
    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)
Ejemplo n.º 4
0
    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)