Skip to content

Commit

Permalink
Fix last broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Sep 2, 2015
1 parent 60a4ea7 commit 763f278
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions tests/test_rst_compiler.py
Expand Up @@ -47,7 +47,6 @@
from nikola.plugins.compile.rest import gist
from nikola.plugins.compile.rest import vimeo
import nikola.plugins.compile.rest.listing
from nikola.plugins.compile.rest.doc import Plugin as DocPlugin
from nikola.utils import _reload
from .base import BaseTestCase, FakeSite

Expand Down Expand Up @@ -281,16 +280,8 @@ class DocTestCase(ReSTExtensionTestCase):
sample2 = 'Sample for testing my :doc:`titled post <fake-post>`'

def setUp(self):
# Initialize plugin, register role
self.plugin = DocPlugin()
self.plugin.set_site(FakeSite())
# Hack to fix leaked state from integration tests
try:
f = docutils.parsers.rst.roles.role('doc', None, None, None)[0]
f.site = FakeSite()
except AttributeError:
pass
return super(DocTestCase, self).setUp()
super(DocTestCase, self).setUp()
docutils.parsers.rst.roles._role_registry['doc'].site = FakeSite()

def test_doc_doesnt_exist(self):
self.assertRaises(Exception, self.assertHTMLContains, 'anything', {})
Expand Down

0 comments on commit 763f278

Please sign in to comment.