functional_tests.py 710 B

123456789101112131415161718192021222324
  1. from selenium import webdriver
  2. import unittest
  3. class NewVisitorTest(unittest.TestCase):
  4. def setUp(self):
  5. self.browser = webdriver.Firefox()
  6. def tearDown(self):
  7. self.browser.quit()
  8. def test_can_start_a_list_and_retrieve_it_later(self):
  9. # Edith has heard about a cool new online to-do app. She goes
  10. # to check out its homepage
  11. self.browser.get('http://localhost:8000')
  12. # She notices the page title and header mention to-do lists
  13. self.assertIn('MovieLib', self.browser.title)
  14. self.fail('Finish the test!')
  15. # She is invited to enter a to-do item straight away
  16. if __name__ == '__main__':
  17. unittest.main(warnings='ignore')