Ejemplo n.º 1
0
    def test_purchasable_items(self):
        for purchase in PURCHASES_BY_UID.values():
            if not isinstance(purchase, PermanentPurchase):
                continue

            self.account.permanent_purchases.insert(purchase.purchase_type)
            self.account.save()

            existed_uids = PURCHASES_BY_UID.keys()
            existed_uids.remove(purchase.uid)

            if purchase.purchase_type.is_INFINIT_SUBSCRIPTION:
                existed_uids = [uid for uid in existed_uids if not uid.startswith('subscription-')]

            self.check_html_ok(self.request_html(self.page_url), texts=[('pgf-no-goods-message', 0), (purchase.uid, 0)] + existed_uids )

            self.account.permanent_purchases._data = set()
            self.account.save()
Ejemplo n.º 2
0
    def test_purchasable_items(self):
        for purchase in PURCHASES_BY_UID.values():
            if not isinstance(purchase, PermanentPurchase):
                continue

            self.account.permanent_purchases.insert(purchase.purchase_type)
            self.account.save()

            existed_uids = PURCHASES_BY_UID.keys()
            existed_uids.remove(purchase.uid)

            if purchase.purchase_type.is_INFINIT_SUBSCRIPTION:
                existed_uids = [
                    uid for uid in existed_uids
                    if not uid.startswith('subscription-')
                ]

            self.check_html_ok(self.request_html(self.page_url),
                               texts=[('pgf-no-goods-message', 0),
                                      (purchase.uid, 0)] + existed_uids)

            self.account.permanent_purchases._data = set()
            self.account.save()
Ejemplo n.º 3
0
    def setUp(self):
        super(BuyRequestesTests, self).setUp()

        self.purchase = PURCHASES_BY_UID.values()[0]
Ejemplo n.º 4
0
 def test_goods(self):
     self.check_html_ok(self.request_html(self.page_url),
                        texts=[('pgf-no-goods-message', 0)] +
                        PURCHASES_BY_UID.keys())
Ejemplo n.º 5
0
 def test_goods(self):
     self.check_html_ok(self.request_html(self.page_url), texts=[('pgf-no-goods-message', 0)] + PURCHASES_BY_UID.keys())
Ejemplo n.º 6
0
    def setUp(self):
        super(BuyRequestesTests, self).setUp()

        self.purchase = PURCHASES_BY_UID.values()[0]