[Patchew-devel] [PATCH 07/11] testing: Provide a serializer class to GetTestView

fam at euphon.net fam at euphon.net
Fri Sep 25 15:42:39 UTC 2020


From: Fam Zheng <fam at euphon.net>

It is required by the framework. An empty one will do.
---
 mods/testing.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mods/testing.py b/mods/testing.py
index 2605dc0..5a708cb 100644
--- a/mods/testing.py
+++ b/mods/testing.py
@@ -648,10 +648,13 @@ class TestingGetView(APILoginRequiredView, GetTestViewMixin):
         po = Project.objects.get(name=project)
         return self._do_testing_get(request, po, tester, capabilities)
 
+class TestSerializer(serializers.BaseSerializer):
+    pass
 
 class GetTestView(generics.GenericAPIView, GetTestViewMixin):
     queryset = Project.objects.all()
     permission_classes = (TestPermission,)
+    serializer_class = TestSerializer
 
     def _generate_test_data(
         self, project, repo, head, base, identity, result_uri, test
-- 
2.25.1






More information about the Patchew-devel mailing list