Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 469d30d

Browse files
authored
unittest.TestCase.assertTrue insted of assert <condition> (baijum#101)
since we use unittet.
1 parent d1ea809 commit 469d30d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/page-objects.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ where the page objects will be defined.
4444
#Load the main page. In this case the home page of Python.org.
4545
main_page = page.MainPage(self.driver)
4646
#Checks if the word "Python" is in title
47-
assert main_page.is_title_matches(), "python.org title doesn't match."
47+
self.assertTrue(main_page.is_title_matches(), "python.org title doesn't match.")
4848
#Sets the text of search textbox to "pycon"
4949
main_page.search_text_element = "pycon"
5050
main_page.click_go_button()
5151
search_results_page = page.SearchResultsPage(self.driver)
5252
#Verifies that the results page is not empty
53-
assert search_results_page.is_results_found(), "No results found."
53+
self.assertTrue(search_results_page.is_results_found(), "No results found.")
5454

5555
def tearDown(self):
5656
self.driver.close()

0 commit comments

Comments
 (0)