Exemplo n.º 1
0
    def test_get_method_generic_api_view(self):
        class MyListView(ListCreateAPIView):
            """
            My comment
            """
            pass

        generator = DocumentationGenerator()
        method_docs = generator.__get_method_docs__(MyListView(), 'POST')

        self.assertEqual("My comment", method_docs)
Exemplo n.º 2
0
    def test_get_method_generic_api_view(self):

        class MyListView(ListCreateAPIView):
            """
            My comment
            """
            pass

        generator = DocumentationGenerator()
        method_docs = generator.__get_method_docs__(MyListView(), 'POST')

        self.assertEqual("My comment", method_docs)
Exemplo n.º 3
0
    def test_get_method_docs(self):

        class TestApiView(APIView):
            def get(self, *args):
                """
                Here are my comments
                """
            pass

        generator = DocumentationGenerator()
        docs_get = generator.__get_method_docs__(TestApiView(), 'GET')

        self.assertEqual("Here are my comments", docs_get)
Exemplo n.º 4
0
    def test_get_method_docs(self):
        class TestApiView(APIView):
            def get(self, *args):
                """
                Here are my comments
                """

            pass

        generator = DocumentationGenerator()
        docs_get = generator.__get_method_docs__(TestApiView(), 'GET')

        self.assertEqual("Here are my comments", docs_get)