Commit 9d9734eb authored by thisLexic's avatar thisLexic

test created for ingredients_list template

parent a6156bdf
......@@ -3,9 +3,19 @@ from django.urls import resolve
from selenium import webdriver
class NewVisitorTest(unittest.TestCase):
class FroyoPagesTest(unittest.TestCase):
def setUp(self):
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://127.0.0.1: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('Finish the test!')
\ 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