mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
Removed unittest.skipUnless decorator: not available on python 2.6
This commit is contained in:
parent
076dd62385
commit
35203f736a
|
@ -1,5 +1,3 @@
|
||||||
import unittest
|
|
||||||
|
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from rest_framework.views import APIView
|
from rest_framework.views import APIView
|
||||||
from rest_framework.compat import apply_markdown
|
from rest_framework.compat import apply_markdown
|
||||||
|
@ -108,16 +106,16 @@ class TestViewNamesAndDescriptions(TestCase):
|
||||||
pass
|
pass
|
||||||
self.assertEquals(MockView().get_description(), '')
|
self.assertEquals(MockView().get_description(), '')
|
||||||
|
|
||||||
@unittest.skipUnless(apply_markdown, 'markdown not installed')
|
|
||||||
def test_markdown(self):
|
def test_markdown(self):
|
||||||
"""Ensure markdown to HTML works as expected"""
|
"""Ensure markdown to HTML works as expected"""
|
||||||
|
if apply_markdown:
|
||||||
gte_21_match = apply_markdown(DESCRIPTION) == MARKED_DOWN_gte_21
|
gte_21_match = apply_markdown(DESCRIPTION) == MARKED_DOWN_gte_21
|
||||||
lt_21_match = apply_markdown(DESCRIPTION) == MARKED_DOWN_lt_21
|
lt_21_match = apply_markdown(DESCRIPTION) == MARKED_DOWN_lt_21
|
||||||
self.assertTrue(gte_21_match or lt_21_match)
|
self.assertTrue(gte_21_match or lt_21_match)
|
||||||
|
|
||||||
@unittest.skipUnless(apply_restructuredtext, 'docutils not installed')
|
|
||||||
def test_restructuredtext(self):
|
def test_restructuredtext(self):
|
||||||
"""Ensure restructuredtext to HTML works as expected."""
|
"""Ensure restructuredtext to HTML works as expected."""
|
||||||
|
if apply_restructuredtext:
|
||||||
# The output isn't tested verbatim because of small rendering changes
|
# The output isn't tested verbatim because of small rendering changes
|
||||||
# between docutils versions.
|
# between docutils versions.
|
||||||
self.assertTrue('<h3>another header</h3>'
|
self.assertTrue('<h3>another header</h3>'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user