mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 16:24:18 +03:00
Use yaml.safe_load instead of load (#6719)
Use of PyYAML's yaml.load function without specifying the Loader parameter has been deprecated, see https://msg.pyyaml.org/load. Earlier versions of PyYAML already had the alternative safe_load function, which limits the loader to a subset of YAML constructs, that is enough for what we need here. Fixes #6677
This commit is contained in:
parent
063f0de949
commit
62ed1f8270
|
@ -45,7 +45,7 @@ class GenerateSchemaTests(TestCase):
|
|||
'--description=Sample description',
|
||||
stdout=self.out)
|
||||
# Check valid YAML was output.
|
||||
schema = yaml.load(self.out.getvalue())
|
||||
schema = yaml.safe_load(self.out.getvalue())
|
||||
assert schema['openapi'] == '3.0.2'
|
||||
|
||||
def test_renders_openapi_json_schema(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user