Skip to content

Commit

Permalink
First functional test now incorporates unittest.
Browse files Browse the repository at this point in the history
  • Loading branch information
tfarrell-vz committed Sep 26, 2014
1 parent 1a3dda5 commit f0ab3c4
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions functional_tests.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
from selenium import webdriver
import unittest

browser = webdriver.Firefox()
class NewVisitorTest(unittest.TestCase):
def setUp(self):
self.browser = webdriver.Firefox()
self.browser.implicitly_wait(3)
def tearDown(self):
self.browser.quit()

# Rob heard about a new online to-do list app. He wants to see if it might be useful for the IT
# department at ABI Research.
browser.get('http://localhost:8000')
def test_can_start_a_list_and_retrieve_it_later(self):
# Rob heard about a new online to-do list app. He wants to see if it might be useful for the IT
# department at ABI Research.
self.browser.get('http://localhost:8000')

# He notices the page title and header mention to-do lists.
assert 'To-Do' in browser.title
# He notices the page title and header mention to-do lists.
self.assertIn('To-Do', self.browser.title)
self.fail('Finish the test!')

# He is invited to enter a to-do item straight away

Expand All @@ -27,5 +35,7 @@

# He visits that URL - his to-do list is still there.

if __name__ == '__main__':
unittest.main(warnings='ignore')


0 comments on commit f0ab3c4

Please sign in to comment.