Skip malformed YAML on PY2 test.

This commit is contained in:
Carlton Gibson 2019-02-14 16:36:10 +01:00
parent 095fd7ad8a
commit fb23cef254

View File

@ -5,7 +5,7 @@ from django.conf.urls import url
from django.core.management import call_command
from django.test import TestCase
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.utils import formatting, json
@ -28,8 +28,9 @@ class GenerateSchemaTests(TestCase):
"""Tests for management command generateschema."""
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):
expected_out = """info:
description: Sample description