Removed unittest.skipUnless decorator: not available on python 2.6

This commit is contained in:
Reinout van Rees 2012-12-21 00:25:48 +01:00
parent 076dd62385
commit 35203f736a

View File

@ -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))