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_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_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_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
def test_get_rewards(self): store = "DE/de" item = psn._getItemForCid("EP0006-CUSA02532_00-UNRAVELUNRAVEL09", store) assert len(psn._get_rewards(item)) > -1
def test_check_currency_symbolAsPartOfName(self): store = "DE/de" cids = psn._get_cid_for_name("Child of Light", store) item = psn._getItemForCid(cids[0], store) assert psn._get_display_price(item, store)[0] == u'\N{EURO SIGN}'
def test_get_item_for_cid2(self): store = "DE/de" cids = psn._get_cid_for_name("Child of Light", store) item = psn._getItemForCid(cids[0], store) assert item['name'] is not None
def test_get_item_for_cid(self): store = "DE/de" cids = psn._get_cid_for_name("Tearaway", store) item = psn._getItemForCid(cids[0], store) assert item['name'] is not None
def test_get_rewards(self): store = "DE/de" item = psn._getItemForCid( "EP0006-CUSA02532_00-UNRAVELUNRAVEL09", store) assert len(psn._get_rewards(item)) > -1
def test_check_currency_symbolAsPartOfName(self): store = "DE/de" cids = psn._get_cid_for_name("Child of Light", store) item = psn._getItemForCid(cids[0], store) assert psn._get_display_price(item, store)[0] == u'\N{EURO SIGN}'
def test_get_item_for_cid2(self): store = "DE/de" cids = psn._get_cid_for_name("Child of Light", store) item = psn._getItemForCid(cids[0], store) assert item['name'] is not None
def test_get_item_for_cid(self): store = "DE/de" cids = psn._get_cid_for_name("Tearaway", store) item = psn._getItemForCid(cids[0], store) assert item['name'] is not None