diff options
author | Anike Arni <aarni@thoughtworks.com> | 2017-02-02 16:58:46 -0200 |
---|---|---|
committer | Anike Arni <aarni@thoughtworks.com> | 2017-02-02 16:58:46 -0200 |
commit | 1a37dcd2dc8a02eda2a0cc3f90521b0ebc1c9198 (patch) | |
tree | 2f50c7b329897ac91bbb9a99c0fbc8d8034a255d /service/pixelated | |
parent | b4c5dae4272722860fe5b145883214a93f9962db (diff) |
[#922] Adds test for recovery resouce
with @tayanefernandes
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/resources/account_recovery_resource.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/service/pixelated/resources/account_recovery_resource.py b/service/pixelated/resources/account_recovery_resource.py index 4b88ff44..a69cac9a 100644 --- a/service/pixelated/resources/account_recovery_resource.py +++ b/service/pixelated/resources/account_recovery_resource.py @@ -17,11 +17,10 @@ import os from xml.sax import SAXParseException -from pixelated.resources import BaseResource, UnAuthorizedResource +from pixelated.resources import BaseResource from twisted.python.filepath import FilePath from pixelated.resources import get_static_folder from twisted.web.http import OK -from twisted.web.resource import NoResource from twisted.web.template import Element, XMLFile, renderElement @@ -33,18 +32,11 @@ class AccountRecoveryPage(Element): class AccountRecoveryResource(BaseResource): - BASE_URL = 'recovery' + isLeaf = True def __init__(self, services_factory): BaseResource.__init__(self, services_factory) - def getChild(self, path, request): - if path == BASE_URL: - return self - if not self.is_logged_in(request): - return UnAuthorizedResource() - return NoResource() - def render_GET(self, request): request.setResponseCode(OK) return self._render_template(request) |