Esempio 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)
Esempio 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)
Esempio 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)
Esempio 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)