          assert 'openapi' in schema
          assert 'paths' in schema
  
      def test_schema_with_no_paths(self):
          patterns = []
          generator = SchemaGenerator(patterns=patterns)
  
          request = create_request('/')
          schema = generator.get_schema(request=request)
 
</s> remove         return json.dumps(data, indent=2).encode('utf-8')
 </s> add         return json.dumps(data, cls=self.encoder_class, indent=2).encode('utf-8') </s> remove     BaseRenderer, BrowsableAPIRenderer, JSONRenderer, OpenAPIRenderer
 </s> add     BaseRenderer, BrowsableAPIRenderer, JSONOpenAPIRenderer, JSONRenderer,
    OpenAPIRenderer
    def test_schema_rendering_to_json(self):
        patterns = [
            path('example/', views.ExampleGenericAPIView.as_view()),
        ]
        generator = SchemaGenerator(patterns=patterns)

        request = create_request('/')
        schema = generator.get_schema(request=request)
        ret = JSONOpenAPIRenderer().render(schema)

        assert b'"openapi": "' in ret
        assert b'"default": "0.0"' in ret

          assert 'openapi' in schema
          assert 'paths' in schema
  
    def test_schema_rendering_to_json(self):
        patterns = [
            path('example/', views.ExampleGenericAPIView.as_view()),
        ]
        generator = SchemaGenerator(patterns=patterns)

        request = create_request('/')
        schema = generator.get_schema(request=request)
        ret = JSONOpenAPIRenderer().render(schema)

        assert b'"openapi": "' in ret
        assert b'"default": "0.0"' in ret

      def test_schema_with_no_paths(self):
          patterns = []
          generator = SchemaGenerator(patterns=patterns)
  
          request = create_request('/')
          schema = generator.get_schema(request=request)
keep keep add keep keep keep keep keep keep
 Fix OpenAPISchema rendering for timedelta (#7641)

* Add failing test when rendering to json a schema with timedelta

* Fix JSONOpenAPIRenderer for fields with default=timedelta()

* fix isort

* fix test for python 3.5

Co-authored-by: Pierre Chiquet <pierre.chiquet@ubikey.fr> 
tests/schemas/test_openapi.py