'Test that requesting bookmarks for a course return results with pagination 200 code.'

@ddt.data(10, 25)
@patch('eventtracking.tracker.emit')
def test_get_bookmarks_with_pagination(self, bookmarks_count, mock_tracker):

    (course, __, bookmarks) = self.create_course_with_bookmarks_count(bookmarks_count, store_type=ModuleStoreEnum.Type.mongo)
    page_size = 5
    query_parameters = 'course_id={}&page_size={}'.format(urllib.quote(unicode(course.id)), page_size)
    response = self.send_get(client=self.client, url=reverse('bookmarks'), query_parameters=query_parameters)
    bookmarks_data = response.data['results']
    self.assertEqual(response.data['count'], bookmarks_count)
    self.assertIn('page=2&page_size={}'.format(page_size), response.data['next'])
    self.assertEqual(response.data['num_pages'], (bookmarks_count / page_size))
    self.assertEqual(len(bookmarks_data), min(bookmarks_count, page_size))
    self.assert_bookmark_data_is_valid(bookmarks[(-1)], bookmarks_data[0])
    self.assert_bookmark_event_emitted(mock_tracker, event_name='edx.bookmark.listed', course_id=unicode(course.id), list_type='per_course', bookmarks_count=bookmarks_count, page_size=page_size, page_number=1)
