#3590 closed defect (fixed)

Error in integration tests (test_web.py test_status()): 'str' object has no attribute 'render'

Reported by: itamarst Owned by: itamarst
Priority: normal Milestone: Support Python 3
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

If you run all of test_web.py integration tests, you get the following traceback:

integration/test_web.py::test_status 2021-01-15T11:25:49-0500 [twisted.python.log#info] web: 127.0.0.1 POST /uri?redirect_to_result=true&t=mkdir&format=sdmf 303 -
2021-01-15T11:25:49-0500 [twisted.python.log#info] web: 127.0.0.1 GET /uri/[CENSORED] 200 49532021-01-15T11:25:49-0500 [twisted.python.log#info] web: 127.0.0.1 POST /uri/[CENSORED] 302 1802021-01-15T11:25:49-0500 [allmydata.webish.TahoeLAFSRequest#critical] 
        Traceback (most recent call last):
          File "/home/itamarst/Devel/tahoe-lafs/venv27/lib/python2.7/site-packages/twisted/web/server.py", line 302, in render
            body = resrc.render(self)
          File "/home/itamarst/Devel/tahoe-lafs/venv27/lib/python2.7/site-packages/twisted/web/util.py", line 138, in render
            self.d.addCallback(self._cbChild, request).addErrback(
          File "/home/itamarst/Devel/tahoe-lafs/venv27/lib/python2.7/site-packages/twisted/internet/defer.py", line 322, in addCallback
            callbackKeywords=kw)
          File "/home/itamarst/Devel/tahoe-lafs/venv27/lib/python2.7/site-packages/twisted/internet/defer.py", line 311, in addCallbacks
            self._runCallbacks()
        --- <exception caught here> ---
          File "/home/itamarst/Devel/tahoe-lafs/venv27/lib/python2.7/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/home/itamarst/Devel/tahoe-lafs/venv27/lib/python2.7/site-packages/twisted/web/util.py", line 144, in _cbChild
            request.render(resource.getChildForRequest(child, request))
          File "/home/itamarst/Devel/tahoe-lafs/venv27/lib/python2.7/site-packages/twisted/web/server.py", line 302, in render
            body = resrc.render(self)
        exceptions.AttributeError: 'str' object has no attribute 'render'

There are two problems here:

  1. The traceback.
  2. The fact the traceback doesn't fail the integration test.

I am not certain this is due to Python 3 port, but it seems plausible, so I am going to try to fix it.

Change History (1)

comment:1 Changed at 2021-01-26T14:50:47Z by GitHub <noreply@…>

  • Resolution set to fixed
  • Status changed from new to closed

In dc3871b/trunk:

Merge pull request #970 from tahoe-lafs/3590.error-in-integration-test

Fix URI redirect error that was manifesting in the integration tests

Fixes ticket:3590

Note: See TracTickets for help on using tickets.