semvec/pypi-packages huggingface dataset:
pytest-testslide 2.6.3
TestSlide fixture for pytest
License: MIT

[TestSlide](https://testslide.readthedocs.io/) fixture for pytest.

## Quickstart

Install:

```
pip install pytest-testslide
```

In your test file:
```
        import pytest
        from pytest_testslide import testslide
        from testslide import StrictMock # if you wish to use StrictMock
        from testslide import matchers # if you wish to use Rspec style argument matchers
        .....
        def test_mock_callable_patching_works(testslide):
            testslide.mock_callable(time, "sleep").to_raise(RuntimeError("Mocked!")) #mock_callable
            with pytest.raises(RuntimeError):
                time.sleep()

        @pytest.mark.asyncio
        async def test_mock_async_callable_patching_works(testslide):
            testslide.mock_async_callable(sample_module.ParentTarget, "async_static_method").to_raise(RuntimeError("Mocked!")) #mock_async_callable
            with pytest.raises(RuntimeError):
                await sample_module.ParentTarget.async_static_method("a", "b")

        def test_mock_constructor_patching_works(testslide):
            testslide.mock_constructor(sample_module, "ParentTarget").to_raise(RuntimeError("Mocked!"))  #mock_constructor
            with pytest.raises(RuntimeError):
                sample_module.ParentTarget()

        def test_patch_attribute_patching_works(testslide):
            testslide.patch_attribute(sample_module.SomeClass, "attribute", "patched") #patch_attribute
            assert sample_module.SomeClass.attribute == "patched"

```
rest-framework-pagination 0.0.1
Django REST framework limit/offset pagination with multiple queryset support
License: MIT
Requires Python: >=3.6

Django Rest Framework Multiple Queryset Pagination
==================================================

This is django rest framework pagination based on LimitOffsetPagination with
multiple queryset support


Installation
============

Install the package with pip:

.. code-block:: sh

    $ pip install rest_framework_pagination

Usage
=====

.. code-block:: python

    from rest_framework.viewsets import GenericViewSet
    from rest_framework.mixins import ListModelMixin
    from rest_framework_pagination.pagination import MultiQuerysetPagination


    class MainPageView(ListModelMixin, GenericViewSet):
        serializer_class = serializers.MainPageSerializer
        pagination_class = MultiQuerysetPagination
        querysets = [models.Person.objects.all(),
                     models.Order.objects.all(),
                     models.Address.objects.all()]

        def get_queryset(self):
            return self.querysets

        def paginate_querysets(self, querysets):
            return self.paginator.paginate(querysets, self.request, view=self)

        def list(self, request, *args, **kwargs):
            page = self.paginate_querysets(self.get_queryset())
            serializer = self.get_serializer_class()(page, many=True)
            return self.get_paginated_response(serializer.data)