Ejemplo n.º 1
0
    def setUp(self):
        super(PremiumDaysTests, self).setUp()

        create_test_map()

        self.days = 30
        self.cost = 130

        self.account = self.accounts_factory.create_account()

        self.hero = heroes_logic.load_hero(account_id=self.account.id)

        self.purchase = PremiumDays(uid='premium-days-uid',
                                    name='premium-days-name',
                                    description='premium-days-description',
                                    cost=int(self.cost / payments_settings.GLOBAL_COST_MULTIPLIER),
                                    days=self.days,
                                    transaction_description='premium-days-transaction-description')
Ejemplo n.º 2
0
    def setUp(self):
        super(PremiumDaysTests, self).setUp()

        create_test_map()

        self.days = 30
        self.cost = 130

        result, account_id, bundle_id = register_user('test_user',
                                                      '*****@*****.**',
                                                      '111111')
        self.account = AccountPrototype.get_by_id(account_id)

        self.hero = HeroPrototype.get_by_account_id(account_id)

        self.purchase = PremiumDays(
            uid='premium-days-uid',
            name=u'premium-days-name',
            description=u'premium-days-description',
            cost=int(self.cost / payments_settings.GLOBAL_COST_MULTIPLIER),
            days=self.days,
            transaction_description='premium-days-transaction-description')