diff --git a/functional_tests.py b/functional_tests.py index 8c189b5..d89c8f0 100644 --- a/functional_tests.py +++ b/functional_tests.py @@ -1,7 +1,17 @@ +import unittest from selenium import webdriver -browser = webdriver.Firefox() -browser.get("http://localhost:8000") +class NewVisitorTest(unittest.TestCase): + def setUp(self): + self.browser = webdriver.Firefox() + + def tearDown(self): + self.browser.quit() -assert "Congratulations!" in browser.title -print("OK") \ No newline at end of file + def test_can_start_a_todo_list(self): + self.browser.get("http://localhost:8000") + self.assertIn("To-Do", self.browser.title) + self.fail("Finish the test!") + +if __name__ == "__main__": + unittest.main() \ No newline at end of file