mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-24 23:19:47 +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 rest_framework.views import APIView
|
||||
from rest_framework.compat import apply_markdown
|
||||
|
@ -108,17 +106,17 @@ class TestViewNamesAndDescriptions(TestCase):
|
|||
pass
|
||||
self.assertEquals(MockView().get_description(), '')
|
||||
|
||||
@unittest.skipUnless(apply_markdown, 'markdown not installed')
|
||||
def test_markdown(self):
|
||||
"""Ensure markdown to HTML works as expected"""
|
||||
gte_21_match = apply_markdown(DESCRIPTION) == MARKED_DOWN_gte_21
|
||||
lt_21_match = apply_markdown(DESCRIPTION) == MARKED_DOWN_lt_21
|
||||
self.assertTrue(gte_21_match or lt_21_match)
|
||||
if apply_markdown:
|
||||
gte_21_match = apply_markdown(DESCRIPTION) == MARKED_DOWN_gte_21
|
||||
lt_21_match = apply_markdown(DESCRIPTION) == MARKED_DOWN_lt_21
|
||||
self.assertTrue(gte_21_match or lt_21_match)
|
||||
|
||||
@unittest.skipUnless(apply_restructuredtext, 'docutils not installed')
|
||||
def test_restructuredtext(self):
|
||||
"""Ensure restructuredtext to HTML works as expected."""
|
||||
# The output isn't tested verbatim because of small rendering changes
|
||||
# between docutils versions.
|
||||
self.assertTrue('<h3>another header</h3>'
|
||||
in apply_restructuredtext(DESCRIPTION))
|
||||
if apply_restructuredtext:
|
||||
# The output isn't tested verbatim because of small rendering changes
|
||||
# between docutils versions.
|
||||
self.assertTrue('<h3>another header</h3>'
|
||||
in apply_restructuredtext(DESCRIPTION))
|
||||
|
|
Loading…
Reference in New Issue
Block a user