def test_check_currently_reduced_item_no_plus_reduction(self): store = "DE/de" item = psn._get_item_for_cid("EP9000-CUSA00194_00-UNTILDAWN0000001", store) print("Checking: ", item["name"]) assert psn._get_normal_price(item) == 59.99 assert psn._get_playstation_plus_price_reduction(item) is None assert psn._get_non_playstation_plus_price_reduction(item) == 44.99 assert psn._get_price(item) == 44.99
def test_check_currently_reduced_item_all_prices(self): store = "DE/de" item = psn._get_item_for_cid("EP9000-CUSA04301_00-DREAMS0000000000", store) print("Checking: ", item["name"]) assert psn._get_normal_price(item) == 39.99 assert psn._get_playstation_plus_price_reduction(item) == 15.99 assert psn._get_non_playstation_plus_price_reduction(item) == 15.99 assert psn._get_price(item) == 15.99
def test_check_currently_reduced_item_all_prices(self): store = "DE/de" item = psn._getItemForCid("EP2107-CUSA00327_00-DONTSTARVEPS4V01", store) print("Checking: ", item['name']) assert psn._get_normal_price(item) == 13.99 assert psn._get_playstation_plus_price(item) == 4.89 assert psn._get_non_playstation_plus_price(item) == 6.99 assert psn._get_price(item) == 4.89
def test_check_currently_reduced_item_all_prices(self): store = "DE/de" item = psn._getItemForCid( "EP2107-CUSA00327_00-DONTSTARVEPS4V01", store) print("Checking: ", item['name']) assert psn._get_normal_price(item) == 13.99 assert psn._get_playstation_plus_price(item) == 4.89 assert psn._get_non_playstation_plus_price(item) == 6.99 assert psn._get_price(item) == 4.89
def test_check_currently_reduced_item_no_plus_reduction(self): store = "DE/de" item = psn._getItemForCid( "EP9000-CUSA00194_00-UNTILDAWN0000001", store) print("Checking: ", item['name']) assert psn._get_normal_price(item) == 59.99 assert psn._get_playstation_plus_price(item) is None assert psn._get_non_playstation_plus_price(item) == 44.99 assert psn._get_price(item) == 44.99
def test_get_playstation_plus_price(self): store = "DE/de" item = psn._getItemForCid(self.freeForPlusCid, store) print( "Using '" + item['name'] + "' (" + self.freeForPlusCid + ") from " + store + " for comparison. Item must be free for Plus members in order to pass the unit test. This might fail due to price changes" ) assert item is not None normalPrice = psn._get_price(item) plusPrice = psn._get_playstation_plus_price(item) print("Normal Price: ", "%.2f" % normalPrice, "Plus Price: ", "%.2f" % plusPrice) assert isinstance(normalPrice, float) assert isinstance(plusPrice, float) assert plusPrice == 0
def test_get_playstation_plus_price(self): store = "DE/de" item = psn._getItemForCid(self.freeForPlusCid, store) print( "Using '" + item['name'] + "' (" + self.freeForPlusCid + ") from " + store + " for comparison. Item must be free for Plus members in order to pass the unit test. This might fail due to price changes") assert item is not None normalPrice = psn._get_price(item) plusPrice = psn._get_playstation_plus_price(item) print ("Normal Price: ", "%.2f" % normalPrice, "Plus Price: ", "%.2f" % plusPrice) assert isinstance(normalPrice, float) assert isinstance(plusPrice, float) assert plusPrice == 0