Beispiel #1
0
    def test_get_events(self):
        """Test get_events API call"""

        # Set up a mock HTTP server
        body = read_file('data/mozillaclub/feed.json')
        httpretty.register_uri(httpretty.GET,
                               MozillaClub_FEED_URL,
                               body=body, status=200)

        client = MozillaClubClient(MozillaClub_FEED_URL)
        response = client.get_cells()

        self.assertEqual(response, body)
    def test_init(self):
        """Test initialization"""

        mozillaclub = MozillaClubClient(MozillaClub_FEED_URL)

        self.assertEqual(mozillaclub.base_url, MozillaClub_FEED_URL)
        self.assertIsNone(mozillaclub.archive)
        self.assertFalse(mozillaclub.from_archive)
        self.assertTrue(mozillaclub.ssl_verify)

        mozillaclub = MozillaClubClient(MozillaClub_FEED_URL, ssl_verify=False)

        self.assertEqual(mozillaclub.base_url, MozillaClub_FEED_URL)
        self.assertIsNone(mozillaclub.archive)
        self.assertFalse(mozillaclub.from_archive)
        self.assertFalse(mozillaclub.ssl_verify)
Beispiel #3
0
 def test_init(self):
     """Test initialization"""
     client = MozillaClubClient(MozillaClub_FEED_URL)