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