def test_get_collection_listing_product_ids(self): self.fake('collection_listings/1/product_ids', method='GET', status=200, body=self.load_fixture('collection_listing_product_ids')) collection_listing = shopify.CollectionListing() collection_listing.id = 1 product_ids = collection_listing.product_ids() self.assertEqual([1, 2], product_ids)
def test_reload_collection_listing(self): self.fake('collection_listings/1', method='GET', status=200, body=self.load_fixture('collection_listing')) collection_listing = shopify.CollectionListing() collection_listing.collection_id = 1 collection_listing.reload() self.assertEqual(1, collection_listing.collection_id) self.assertEqual("Home page", collection_listing.title)
def test_reload_collection_listing(self): self.fake("collection_listings/1", method="GET", code=200, body=self.load_fixture("collection_listing")) collection_listing = shopify.CollectionListing() collection_listing.collection_id = 1 collection_listing.reload() self.assertEqual(1, collection_listing.collection_id) self.assertEqual("Home page", collection_listing.title)
def test_get_collection_listing_product_ids(self): self.fake( "collection_listings/1/product_ids", method="GET", code=200, body=self.load_fixture("collection_listing_product_ids"), ) collection_listing = shopify.CollectionListing() collection_listing.id = 1 product_ids = collection_listing.product_ids() self.assertEqual([1, 2], product_ids)