Replace nevow with twisted.web in test.web.test_grid

This commit is contained in:
Sajith Sasidharan 2020-05-05 11:51:28 -04:00
parent 0a43409adc
commit edd4cab42b
2 changed files with 4 additions and 3 deletions

0
newsfragments/3306.minor Normal file
View File

View File

@ -6,7 +6,7 @@ from six.moves import StringIO
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from nevow import rend from twisted.web import resource
from twisted.trial import unittest from twisted.trial import unittest
from allmydata import uri, dirnode from allmydata import uri, dirnode
from allmydata.util import base32 from allmydata.util import base32
@ -27,8 +27,9 @@ DIR_HTML_TAG = '<html lang="en">'
class CompletelyUnhandledError(Exception): class CompletelyUnhandledError(Exception):
pass pass
class ErrorBoom(rend.Page):
def beforeRender(self, ctx): class ErrorBoom(resource.Resource):
def render(self, req):
raise CompletelyUnhandledError("whoops") raise CompletelyUnhandledError("whoops")
class Grid(GridTestMixin, WebErrorMixin, ShouldFailMixin, testutil.ReallyEqualMixin, unittest.TestCase): class Grid(GridTestMixin, WebErrorMixin, ShouldFailMixin, testutil.ReallyEqualMixin, unittest.TestCase):