示例#1
0
    def test_get_serializer_class_simple_serializer(self):
        viewset = FilledPDFFormViewSet(_paginator=True, kwargs={})

        actual = viewset.get_serializer_class()

        assert actual is FilledPDFFormSerializer
示例#2
0
    def test_get_serializer_class_detail_not_paginated(self):
        viewset = FilledPDFFormViewSet(_paginator=None, kwargs={})

        actual = viewset.get_serializer_class()

        assert actual is FilledPDFFormNestedSerializer
示例#3
0
    def test_get_serializer_class_detail(self):
        viewset = FilledPDFFormViewSet(kwargs={'pk': 123})

        actual = viewset.get_serializer_class()

        assert actual is FilledPDFFormNestedSerializer
示例#4
0
    def test_get_serializer_class_simple_serializer(self):
        viewset = FilledPDFFormViewSet(_paginator=True, kwargs={})

        actual = viewset.get_serializer_class()

        assert actual is FilledPDFFormSerializer
示例#5
0
    def test_get_serializer_class_detail_not_paginated(self):
        viewset = FilledPDFFormViewSet(_paginator=None, kwargs={})

        actual = viewset.get_serializer_class()

        assert actual is FilledPDFFormNestedSerializer
示例#6
0
    def test_get_serializer_class_detail(self):
        viewset = FilledPDFFormViewSet(kwargs={"pk": 123})

        actual = viewset.get_serializer_class()

        assert actual is FilledPDFFormNestedSerializer