'Check a page of snapshots list.'

def _assert_list_next(self, expected_query=None, project=fake.PROJECT_ID, **kwargs):

    request_path = ('/v2/%s/snapshots' % project)
    expected_path = request_path
    if kwargs:
        request_str = ((request_path + '?') + urllib.urlencode(kwargs))
    else:
        request_str = request_path
    req = fakes.HTTPRequest.blank(request_str)
    res = self.controller.index(req)
    if expected_query:
        self.assertIn('snapshots_links', res)
        links = res['snapshots_links']
        self.assertTrue(list, type(links))
        next_link = links[0]
        self.assertIn('rel', next_link)
        self.assertIn('next', next_link['rel'])
        self.assertIn('href', next_link)
        href_parts = urllib.urlparse(next_link['href'])
        self.assertEqual(expected_path, href_parts.path)
        params = urllib.parse_qs(href_parts.query)
        self.assertDictEqual(expected_query, params)
    else:
        self.assertNotIn('snapshots_links', res)
