def setUp(self): self.app = self.get_app() cfg = self.inapp_config = InappConfig(addon=self.app, status=amo.INAPP_STATUS_ACTIVE) cfg.public_key = self.app_id = InappConfig.generate_public_key() self.app_secret = InappConfig.generate_private_key() cfg.save() cfg.set_private_key(self.app_secret) self.app.paypal_id = '*****@*****.**' self.app.save()
def setUp(self): self.app = self.get_app() cfg = self.inapp_config = InappConfig(addon=self.app, status=amo.INAPP_STATUS_ACTIVE) cfg.public_key = self.app_id = InappConfig.generate_public_key() self.app_secret = InappConfig.generate_private_key() cfg.save() cfg.set_private_key(self.app_secret) self.app.paypal_id = '*****@*****.**' self.app.save() if hasattr(Price, '_currencies'): del Price._currencies # needed to pick up fixtures.
def setUp(self): super(TestInappIPN, self).setUp() self.app = self.get_app() cfg = self.inapp_config = InappConfig(addon=self.app, status=amo.INAPP_STATUS_ACTIVE) cfg.public_key = self.app_id = InappConfig.generate_public_key() cfg.private_key = self.app_secret = InappConfig.generate_private_key() cfg.save() self.app.paypal_id = '*****@*****.**' self.app.save() waffle.models.Switch.objects.create(name='in-app-payments-ui', active=True) self.user = UserProfile.objects.get(email='*****@*****.**') assert self.client.login(username='******', password='******')