test_unexpectedDecodeError fails with UnexpectedException

Using:

  • current master branch: ae11ec7d
  • cd testing; tox -v -- -v -s -x --pdb tests/server/test_session.py

Output:

tests/server/test_session.py::SoledadSessionTestCase::test_unexpectedDecodeError decode raised
Unexpected failure from credentials factory
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 398, in debug
    getattr(self, self._testMethodName)()
  File "/home/drebs/dev/leap/repos/soledad/testing/tests/server/test_session.py", line 165, in test_unexpectedDecodeError
    child = getChildForRequest(self.wrapper, request)
  File "/home/drebs/dev/leap/repos/soledad/testing/.tox/py27/local/lib/python2.7/site-packages/twisted/web/resource.py", line 98, in getChildForRequest
    resource = resource.getChildWithDefault(pathElement, request)
  File "/home/drebs/dev/leap/repos/soledad/testing/.tox/py27/local/lib/python2.7/site-packages/twisted/web/_auth/wrapper.py", line 147, in getChildWithDefault
    return self._authorizedResource(request)
--- <exception caught here> ---
  File "/home/drebs/dev/leap/repos/soledad/src/leap/soledad/server/session.py", line 117, in _authorizedResource
    credentials = self._credentialFactory.decode(auth_data, request)
  File "/home/drebs/dev/leap/repos/soledad/testing/tests/server/test_session.py", line 160, in decode
    raise UnexpectedException()
server.test_session.UnexpectedException: 
Edited by drebs