def test_api_get(self, func): api = Api('', 'fake_consumer_key', 'fake_consumer_secret') obj = api.get_products() assert all(type(x) == Product for x in obj) obj = api.get_products(56) assert type(obj) == Product and obj.id == 56
def test_object_refresh(self, func): api = Api('', 'fake_consumer_key', 'fake_consumer_secret') obj = api.get_products(56) assert type(obj) == Product and obj.id == 56 obj.refresh() assert type(obj) == Product and obj.id == 56