Ejemplo n.º 1
0
    def test_get_entries(self):
        """Test get_entries API call"""

        # Set up a mock HTTP server
        body = read_file('data/rss/rss_entries.xml')
        httpretty.register_uri(httpretty.GET,
                               RSS_FEED_URL,
                               body=body, status=200)

        client = RSSClient(RSS_FEED_URL)
        response = client.get_entries()

        self.assertEqual(response, body)
Ejemplo n.º 2
0
 def test_init(self):
     """Test initialization"""
     client = RSSClient(RSS_FEED_URL)