#NEWLINE# def assert_definition( self , expected_table_definition , sorting = False ) : #NEWLINE# #INDENT# "Checks that actual table is expected one.\n        Items to compare: 'next' and 'prev' links, count of rows and names of\n        elements in list\n        :param expected_table_definition: expected values (dictionary)\n        :param sorting: boolean arg specifying whether to sort actual names\n        :return:\n        " #NEWLINE# names = [ names . cells [ 'name' ] . text for row in self . rows ] #NEWLINE# if sorting : #NEWLINE# #INDENT# names . sort ( ) #NEWLINE# #UNINDENT# actual_table = { #NEWLINE# #INDENT# 'Next' : self . is_next_link_available ( ) , #NEWLINE# 'Prev' : self . is_prev_link_available ( ) , #NEWLINE# 'Count' : len ( self . rows ) , #NEWLINE# 'Names' : names , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertDictEqual ( actual_table , expected_table_definition )