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

parent 95dc56b6
...@@ -4,3 +4,4 @@ geckodriver.log ...@@ -4,3 +4,4 @@ geckodriver.log
**/__pycache__ **/__pycache__
*.pyc *.pyc
pyvenv.cfg pyvenv.cfg
db.sqlite3
\ No newline at end of file
...@@ -9,3 +9,16 @@ class CustomerTest(unittest.TestCase): ...@@ -9,3 +9,16 @@ class CustomerTest(unittest.TestCase):
def tearDown(self): def tearDown(self):
self.browser.quit() 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