Example #1
0
 def test_bad_request(self):
     """Test with no email body."""
     res = post_email(self.get_request())
     eq_(res.status_code, 400)
Example #2
0
 def test_successful(self, _mock):
     req = self.get_request({'body': 'something'})
     res = post_email(req)
     _mock.assert_called_with(('something',))
     eq_(res.status_code, 201)
Example #3
0
 def test_bad_request(self):
     """Test with no email body."""
     res = post_email(self.get_request())
     eq_(res.status_code, 400)
Example #4
0
 def test_successful(self, _mock):
     req = self.get_request({'body': 'something'})
     res = post_email(req)
     _mock.assert_called_with(('something',))
     eq_(res.status_code, 201)
Example #5
0
 def test_response(self, _mock):
     res = post_email(self.get_request({'email_body': 'something'}))
     _mock.assert_called_with(('something',))
     eq_(res.status_code, 201)
Example #6
0
 def test_successful(self, _mock):
     req = self.get_request({"body": "something"})
     res = post_email(req)
     _mock.assert_called_with(("something",))
     eq_(res.status_code, 201)