Esempio n. 1
0
    def test_rest_endpoint_is_called(self):
        _mock_fetch_uris(self.endpoint, self.resource_uri)

        reader = APIReader(endpoint='http://' + self.endpoint, type='install',
                           field='foo')
        values = list(reader.extract(self.last_week, self.yesterday))

        # If we get back 20 values, it means that all the data had been read
        # from the API
        self.assertEquals(len(values), 20)
    def test_rest_endpoint_is_called(self):
        _mock_fetch_uris(self.endpoint, self.resource_uri)

        reader = APIReader(endpoint='http://' + self.endpoint,
                           type='install',
                           field='foo')
        values = list(reader.extract(self.last_week, self.yesterday))

        # If we get back 20 values, it means that all the data had been read
        # from the API
        self.assertEquals(len(values), 20)