Exemple #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.activate_bounce(self.bounce_id, test=True)
     self.assertIs(r.bounce, None)
Exemple #2
0
 def test_simple_api(self, mock_request):
     mock_request.return_value = self.mock_response(self.json_response)
     r = pystmark.activate_bounce(self.bounce_id, test=True)
     self.assertValidJSONResponse(r, self.schema)
Exemple #3
0
 def test_bounce_activate(self):
     r = pystmark.activate_bounce(777, test=True)
     self.assert500(r)
Exemple #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.activate_bounce(self.bounce_id, test=True)
     self.assertIs(r.bounce, None)
Exemple #5
0
 def test_simple_api(self, mock_request):
     mock_request.return_value = self.mock_response(self.json_response)
     r = pystmark.activate_bounce(self.bounce_id, test=True)
     self.assertValidJSONResponse(r, self.schema)
Exemple #6
0
 def test_bounce_activate(self):
     r = pystmark.activate_bounce(777, test=True)
     self.assert500(r)