Commit 112a9aae authored by Ayn Collado's avatar Ayn Collado

Split main test into 12 different test methods

parent 999780e7
......@@ -9,85 +9,84 @@ class NewVisitorTest(unittest.TestCase):
def tearDown(self):
self.browser.quit()
def test_every_test_is_in_here(self):
#test_display_ingredients_list
def test_display_ingredients_list(self):
self.browser.get('http://localhost:8000/froyo/ingredients_list/')
header_value = 'Ingredients - List'
self.assertIn('Ingredients - List', self.browser.title)
detail = self.browser.find_element_by_tag_name('h1')
self.assertEqual(detail.get_attribute('innerHTML'), header_value)
#test_display_ingredients_detail
def test_display_ingredients_detail(self):
self.browser.get('http://localhost:8000/froyo/ingredients_detail/')
header_value = 'Ingredients - Detail'
self.assertIn('Ingredients - Detail', self.browser.title)
detail = self.browser.find_element_by_tag_name('h1')
self.assertEqual(detail.get_attribute('innerHTML'), header_value)
#test_display_ingredients_update_form
def test_display_ingredients_update_form(self):
self.browser.get('http://localhost:8000/froyo/ingredients_update_form/')
header_value = 'Ingredients - Update'
self.assertIn('Ingredients - Update', self.browser.title)
detail = self.browser.find_element_by_tag_name('h1')
self.assertEqual(detail.get_attribute('innerHTML'), header_value)
#test_display_ingredients_create_form
def test_display_ingredients_create_form(self):
self.browser.get('http://localhost:8000/froyo/ingredients_create_form/')
header_value = 'Ingredients - Create'
self.assertIn('Ingredients - Create', self.browser.title)
detail = self.browser.find_element_by_tag_name('h1')
self.assertEqual(detail.get_attribute('innerHTML'), header_value)
#test_display_recipes_list
def test_display_recipes_list(self):
self.browser.get('http://localhost:8000/froyo/recipes_list/')
header_value = 'Recipes - List'
self.assertIn('Recipes - List', self.browser.title)
detail = self.browser.find_element_by_tag_name('h1')
self.assertEqual(detail.get_attribute('innerHTML'), header_value)
#test_display_recipes_detail
def test_display_recipes_detail(self):
self.browser.get('http://localhost:8000/froyo/recipes_detail/')
header_value = 'Recipes - Detail'
self.assertIn('Recipes - Detail', self.browser.title)
detail = self.browser.find_element_by_tag_name('h1')
self.assertEqual(detail.get_attribute('innerHTML'), header_value)
#test_display_recipes_update_form
def test_display_recipes_update_form(self):
self.browser.get('http://localhost:8000/froyo/recipes_update_form/')
header_value = 'Recipes - Update'
self.assertIn('Recipes - Update', self.browser.title)
detail = self.browser.find_element_by_tag_name('h1')
self.assertEqual(detail.get_attribute('innerHTML'), header_value)
#test_display_recipes_create_form
def test_display_recipes_create_form(self):
self.browser.get('http://localhost:8000/froyo/recipes_create_form/')
header_value = 'Recipes - Create'
self.assertIn('Recipes - Create', self.browser.title)
detail = self.browser.find_element_by_tag_name('h1')
self.assertEqual(detail.get_attribute('innerHTML'), header_value)
#test_display_orders_list
def test_display_orders_list(self):
self.browser.get('http://localhost:8000/froyo/orders_list/')
header_value = 'Orders - List'
self.assertIn('Orders - List', self.browser.title)
detail = self.browser.find_element_by_tag_name('h1')
self.assertEqual(detail.get_attribute('innerHTML'), header_value)
#test_display_orders_detail
def test_display_orders_detail(self):
self.browser.get('http://localhost:8000/froyo/orders_detail/')
header_value = 'Orders - Detail'
self.assertIn('Orders - Detail', self.browser.title)
detail = self.browser.find_element_by_tag_name('h1')
self.assertEqual(detail.get_attribute('innerHTML'), header_value)
#test_display_orders_update_form
def test_display_orders_update_form(self):
self.browser.get('http://localhost:8000/froyo/orders_update_form/')
header_value = 'Orders - Update'
self.assertIn('Orders - Update', self.browser.title)
detail = self.browser.find_element_by_tag_name('h1')
self.assertEqual(detail.get_attribute('innerHTML'), header_value)
#test_display_orders_list
def test_display_orders_create(self):
self.browser.get('http://localhost:8000/froyo/orders_create_form/')
header_value = 'Orders - Create'
self.assertIn('Orders - Create', self.browser.title)
......
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