Example #1
0
 def test_verify(self):
     url = absolutify(
         reverse('receipt.test.verify', kwargs={'status': 'expired'}))
     receipt = create_test_receipt('http://foo', 'expired')
     req = RawRequestFactory().post(url, receipt)
     res = devhub_verify(req, 'expired')
     eq_(json.loads(res.content)['status'], 'expired')
Example #2
0
 def test_verify(self):
     url = absolutify(reverse('receipt.test.verify',
                              kwargs={'status': 'expired'}))
     receipt = create_test_receipt('http://foo', 'expired')
     req = RawRequestFactory().post(url, receipt)
     res = devhub_verify(req, 'expired')
     eq_(json.loads(res.content)['status'], 'expired')
Example #3
0
 def test_verify_fails(self):
     req = RawRequestFactory().post('/', '')
     res = devhub_verify(req, 'expired')
     eq_(json.loads(res.content)['status'], 'invalid')
Example #4
0
 def test_verify_fails(self):
     req = RawRequestFactory().post('/', '')
     res = devhub_verify(req, 'expired')
     eq_(json.loads(res.content)['status'], 'invalid')
Example #5
0
 def test_verify(self):
     url = absolutify(reverse("receipt.test.verify", kwargs={"status": "expired"}))
     receipt = create_test_receipt("http://foo", "expired")
     req = RawRequestFactory().post(url, receipt)
     res = devhub_verify(req, "expired")
     eq_(json.loads(res.content)["status"], "expired")
Example #6
0
 def test_verify_fails(self):
     req = RawRequestFactory().post("/", "")
     res = devhub_verify(req, "expired")
     eq_(json.loads(res.content)["status"], "invalid")