Last active
November 24, 2015 08:34
-
-
Save jinhoyoo/eab54220e406bbc828c2 to your computer and use it in GitHub Desktop.
Example: Flask test with unittest
This file contains hidden or 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
import os | |
from datalibs import app | |
import unittest | |
class AppViewTestCase(unittest.TestCase): | |
def setUp(self): | |
app.config['TESTING'] = True | |
self.app = app.test_client() | |
def tearDown(self): | |
pass | |
def test_first_page(self): | |
rv = self.app.get('/login') | |
print rv.data | |
if __name__ == '__main__': | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment