コード例 #1
0
ファイル: test_api.py プロジェクト: aricha/zamboni
 def test_bad_request(self):
     """Test with no email body."""
     res = post_email(self.get_request())
     eq_(res.status_code, 400)
コード例 #2
0
ファイル: test_api.py プロジェクト: aricha/zamboni
 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)
コード例 #3
0
 def test_bad_request(self):
     """Test with no email body."""
     res = post_email(self.get_request())
     eq_(res.status_code, 400)
コード例 #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)
コード例 #5
0
ファイル: test_api.py プロジェクト: pythonchelle/zamboni
 def test_response(self, _mock):
     res = post_email(self.get_request({'email_body': 'something'}))
     _mock.assert_called_with(('something',))
     eq_(res.status_code, 201)
コード例 #6
0
ファイル: test_api.py プロジェクト: spasovski/zamboni
 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)