added two tests, added to .gitignore, so far tests works commit

parent 95dc56b6
......@@ -4,3 +4,4 @@ geckodriver.log
**/__pycache__
*.pyc
pyvenv.cfg
db.sqlite3
\ No newline at end of file
......@@ -8,4 +8,17 @@ class CustomerTest(unittest.TestCase):
self.browser = webdriver.Firefox()
def tearDown(self):
self.browser.quit()
\ No newline at end of file
self.browser.quit()
def test_can_display_ingredients_list(self):
self.browser.get('http://localhost:8000/froyo/ingredients_list/')
correct_value = 'Ingredients - List'
self.assertIn(correct_value, self.browser.title)
detail = self.browser.find_element_by_tag_name('h1')
self.assertEqual(detail.get_attribute('innerHTML'), correct_value)
def test_can_display_all_froyo_pages(self):
self.fail('Finished the test! Test Successful!')
if __name__ == '__main__':
unittest.main(warnings='ignore')
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment