Commit b4cd8bee authored by Ayn Collado's avatar Ayn Collado

Let's just make it one test ok

parent ba13a9c1
......@@ -18,7 +18,6 @@ class NewVisitorTest(unittest.TestCase):
# She sees a list containing three heroes with their corresponding
# names, health points, and damage
def test_cloud_in_home_page(self):
self.browser.get('http://localhost:8000')
detail = self.browser.find_element_by_id('cloud_name')
self.assertEqual(detail.get_attribute('innerHTML'), 'Cloud')
......@@ -27,7 +26,6 @@ class NewVisitorTest(unittest.TestCase):
detail = self.browser.find_element_by_id('cloud_ad')
self.assertEqual(detail.get_attribute('innerHTML'), '57')
def test_sunflowey_in_home_page(self):
self.browser.get('http://localhost:8000')
detail = self.browser.find_element_by_id('sunflowey_name')
self.assertEqual(detail.get_attribute('innerHTML'), 'Sunflowey')
......@@ -36,7 +34,6 @@ class NewVisitorTest(unittest.TestCase):
detail = self.browser.find_element_by_id('sunflowey_ad')
self.assertEqual(detail.get_attribute('innerHTML'), '43')
def test_jester_in_home_page(self):
self.browser.get('http://localhost:8000')
detail = self.browser.find_element_by_id('jester_name')
self.assertEqual(detail.get_attribute('innerHTML'), 'Jester')
......@@ -45,30 +42,24 @@ class NewVisitorTest(unittest.TestCase):
detail = self.browser.find_element_by_id('jester_ad')
self.assertEqual(detail.get_attribute('innerHTML'), '64')
def test_cloud_check_title_and_heading(self):
self.browser.get('http://localhost:8000/hero/cloud')
self.assertIn('Detail - Cloud', self.browser.title)
detail = self.browser.find_element_by_id('cloud_heading')
self.assertEqual(detail.get_attribute('innerHTML'), 'Detail - Cloud')
def test_sunflowey_check_title_and_heading(self):
self.browser.get('http://localhost:8000/hero/sunflowey')
self.assertIn('Detail - Sunflowey', self.browser.title)
detail = self.browser.find_element_by_id('sunflowey_heading')
self.assertEqual(detail.get_attribute('innerHTML'), 'Detail - Sunflowey')
def test_jester_check_title_and_heading(self):
self.browser.get('http://localhost:8000/hero/jester')
self.assertIn('Detail - Jester', self.browser.title)
detail = self.browser.find_element_by_id('jester_heading')
self.assertEqual(detail.get_attribute('innerHTML'), 'Detail - Jester')
def check_button(self):
homeButton = self.browser.find_element_by_id('homeButton').click()
self.assertEqual(resolve('/').func, home_page)
def test_pass(self):
self.fail('Finish the test!')
if __name__ == '__main__':
......
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