mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-01 02:50:06 +03:00
Skip malformed YAML on PY2 test.
This commit is contained in:
parent
095fd7ad8a
commit
fb23cef254
|
@ -5,7 +5,7 @@ from django.conf.urls import url
|
||||||
from django.core.management import call_command
|
from django.core.management import call_command
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.test.utils import override_settings
|
from django.test.utils import override_settings
|
||||||
from six import StringIO
|
from django.utils import six
|
||||||
|
|
||||||
from rest_framework.compat import coreapi
|
from rest_framework.compat import coreapi
|
||||||
from rest_framework.utils import formatting, json
|
from rest_framework.utils import formatting, json
|
||||||
|
@ -28,8 +28,9 @@ class GenerateSchemaTests(TestCase):
|
||||||
"""Tests for management command generateschema."""
|
"""Tests for management command generateschema."""
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.out = StringIO()
|
self.out = six.StringIO()
|
||||||
|
|
||||||
|
@pytest.mark.skipif(six.PY2, reason='PyYAML unicode output is malformed on PY2.')
|
||||||
def test_renders_default_schema_with_custom_title_url_and_description(self):
|
def test_renders_default_schema_with_custom_title_url_and_description(self):
|
||||||
expected_out = """info:
|
expected_out = """info:
|
||||||
description: Sample description
|
description: Sample description
|
||||||
|
|
Loading…
Reference in New Issue
Block a user