Skip to content
Permalink
Browse files

Fix last broken test

  • Loading branch information
ralsina committed Sep 2, 2015
1 parent 60a4ea7 commit 763f2783cc7f64cec993aefcc8ee037b1271206e
Showing with 2 additions and 11 deletions.
  1. +2 −11 tests/test_rst_compiler.py
@@ -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

@@ -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', {})

0 comments on commit 763f278

Please sign in to comment.
You can’t perform that action at this time.