Exemple #1
0
    def find_by_pagination(cls, collection_type, collection_query,
                           paginated_url, **kwargs):
        elements, next_marker = collection_query.paginated_collection(**kwargs)

        return pagination.PaginatedDataView(collection_type,
                                            elements,
                                            paginated_url,
                                            next_marker)
Exemple #2
0
 def test_creation_with_none_string_marker(self):
     view = pagination.PaginatedDataView("TestType", [],
                                         "http://current_page",
                                         next_page_marker=52)
     self.assertEqual("52", view.next_page_marker)
Exemple #3
0
 def test_creation_with_none_marker(self):
     view = pagination.PaginatedDataView("TestType", [],
                                         "http://current_page",
                                         next_page_marker=None)
     self.assertIsNone(view.next_page_marker)