Ejemplo n.º 1
0
 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
Ejemplo n.º 2
0
 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
Ejemplo n.º 5
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_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
Ejemplo n.º 7
0
 def test_get_rewards(self):
     store = "DE/de"
     item = psn._getItemForCid("EP0006-CUSA02532_00-UNRAVELUNRAVEL09",
                               store)
     assert len(psn._get_rewards(item)) > -1
Ejemplo n.º 8
0
 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}'
Ejemplo n.º 9
0
    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
Ejemplo n.º 10
0
    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
Ejemplo n.º 11
0
 def test_get_rewards(self):
     store = "DE/de"
     item = psn._getItemForCid(
         "EP0006-CUSA02532_00-UNRAVELUNRAVEL09", store)
     assert len(psn._get_rewards(item)) > -1
Ejemplo n.º 12
0
 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}'
Ejemplo n.º 13
0
    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
Ejemplo n.º 14
0
    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