'Verify the pagination information.
Argument:
response: response from api
total_notes: total notes in the response
num_pages: total number of pages in response
notes_per_page: number of notes in the response
current_page: current page number
previous_page: previous page number
next_page: next page number
start: start of the current page'

def _verify_pagination_info(self, response, total_notes, num_pages, notes_per_page, current_page, previous_page, next_page, start):

    def get_page_value(url):
        '\n                                                Return    page    value    extracted    from    url.\n                                                '
        if (url is None):
            return None
        parsed = urlparse.urlparse(url)
        query_params = urlparse.parse_qs(parsed.query)
        page = query_params['page'][0]
        return (page if (page is None) else int(page))
    self.assertEqual(response['total'], total_notes)
    self.assertEqual(response['num_pages'], num_pages)
    self.assertEqual(len(response['rows']), notes_per_page)
    self.assertEqual(response['current_page'], current_page)
    self.assertEqual(get_page_value(response['previous']), previous_page)
    self.assertEqual(get_page_value(response['next']), next_page)
    self.assertEqual(response['start'], start)
