Esempio n. 1
0
    def test_api_get(self, func):
        api = Api('', 'fake_consumer_key', 'fake_consumer_secret')

        obj = api.get_product_reviews()
        assert all(type(x) == ProductReview for x in obj)

        obj = api.get_product_reviews(42)
        assert type(obj) == ProductReview and obj.id == 42
Esempio n. 2
0
    def test_object_refresh(self, func):
        api = Api('', 'fake_consumer_key', 'fake_consumer_secret')

        obj = api.get_product_reviews(42)
        assert type(obj) == ProductReview and obj.id == 42

        obj.refresh()
        assert type(obj) == ProductReview and obj.id == 42