コード例 #1
0
ファイル: test_requests.py プロジェクト: Alkalit/the-tale
    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()
コード例 #2
0
ファイル: test_requests.py プロジェクト: pavetok/the-tale
    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()
コード例 #3
0
ファイル: test_requests.py プロジェクト: pavetok/the-tale
    def setUp(self):
        super(BuyRequestesTests, self).setUp()

        self.purchase = PURCHASES_BY_UID.values()[0]
コード例 #4
0
ファイル: test_requests.py プロジェクト: pavetok/the-tale
 def test_goods(self):
     self.check_html_ok(self.request_html(self.page_url),
                        texts=[('pgf-no-goods-message', 0)] +
                        PURCHASES_BY_UID.keys())
コード例 #5
0
ファイル: test_requests.py プロジェクト: Alkalit/the-tale
 def test_goods(self):
     self.check_html_ok(self.request_html(self.page_url), texts=[('pgf-no-goods-message', 0)] + PURCHASES_BY_UID.keys())
コード例 #6
0
ファイル: test_requests.py プロジェクト: Alkalit/the-tale
    def setUp(self):
        super(BuyRequestesTests, self).setUp()

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