Esempio n. 1
0
 def test_free(self):
     # Just a smoke test that we can serialize this correctly.
     self.create()
     self.app.update(premium_type=mkt.ADDON_FREE)
     res = AddonPaymentAccountSerializer(
         data={'addon': self.app.get_api_url(),
               'payment_account': self.payment_url})
     ok_(not res.is_valid())
Esempio n. 2
0
 def test_serialize(self):
     # Just a smoke test that we can serialize this correctly.
     self.create()
     request = Request(RequestFactory().get('/'))
     res = AddonPaymentAccountSerializer(self.payment,
                                         context={'request': request}).data
     eq_(res['url'], self.app_payment_detail)
Esempio n. 3
0
 def test_free(self):
     # Just a smoke test that we can serialize this correctly.
     self.create()
     self.app.update(premium_type=amo.ADDON_FREE)
     res = AddonPaymentAccountSerializer(self.payment)
     ok_(not res.is_valid())
Esempio n. 4
0
 def test_serialize(self):
     # Just a smoke test that we can serialize this correctly.
     self.create()
     res = AddonPaymentAccountSerializer(self.payment).data
     eq_(res['url'], self.app_payment_detail)