Created
December 5, 2012 13:59
-
-
Save brantz/4215701 to your computer and use it in GitHub Desktop.
the webtest test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#encoding: utf-8 | |
from webtest import TestApp | |
from webtest.debugapp import debug_app | |
from server import Server | |
import unittest | |
class ErrorMailerTest(unittest.TestCase): | |
def test_minimal_request(self): | |
self.app = TestApp(Server) | |
self.response = self.app.post('/mailer') | |
self.response = self.server.post( | |
'/mailer', { | |
'subject' : 'test subject', | |
'content' : 'test content' | |
} | |
) | |
self.assertTrue(self.response.status == 200) | |
if __name__ == '__main__': | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment