Example #1
0
 def test_bad_json_response(self, mock_request):
     mock_request.return_value = self.mock_response(self.json_response,
                                                    bad_json=True)
     r = pystmark.get_bounces(test=True)
     self.assertEqual(r.bounces, [])
     self.assertEqual(r.total, 0)
Example #2
0
 def test_simple_api(self, mock_request):
     mock_request.return_value = self.mock_response(self.json_response)
     r = pystmark.get_bounces(test=True)
     self.assertValidJSONResponse(r, self.schema)
Example #3
0
 def test_get_bounces(self):
     r = pystmark.get_bounces(test=True)
     # TODO -- should be 200, once Postmark fixes theirs
     self.assert500(r)
Example #4
0
 def test_bad_json_response(self, mock_request):
     mock_request.return_value = self.mock_response(self.json_response,
                                                    bad_json=True)
     r = pystmark.get_bounces(test=True)
     self.assertEqual(r.bounces, [])
     self.assertEqual(r.total, 0)
Example #5
0
 def test_simple_api(self, mock_request):
     mock_request.return_value = self.mock_response(self.json_response)
     r = pystmark.get_bounces(test=True)
     self.assertValidJSONResponse(r, self.schema)
Example #6
0
 def test_get_bounces(self):
     r = pystmark.get_bounces(test=True)
     # TODO -- should be 200, once Postmark fixes theirs
     self.assert500(r)