Skip to content

Instantly share code, notes, and snippets.

@mathyourlife
Created March 27, 2017 23:02
Show Gist options
  • Save mathyourlife/ed2ea0bccbea3674e487269df2715942 to your computer and use it in GitHub Desktop.
Save mathyourlife/ed2ea0bccbea3674e487269df2715942 to your computer and use it in GitHub Desktop.
import unittest
import unh698
class FlaskrTestCase(unittest.TestCase):
def setUp(self):
self.app = unh698.app.test_client()
def tearDown(self):
pass
def test_home_page(self):
# Render the / path of the website
rv = self.app.get('/')
# Chech that the page contians the desired phrase
assert b'UNH698 Website' in 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