diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/pixelated/resources/backup_account_resource.py (renamed from service/pixelated/resources/account_recovery_resource.py) | 10 | ||||
-rw-r--r-- | service/pixelated/resources/root_resource.py | 4 | ||||
-rw-r--r-- | service/test/unit/resources/test_backup_account_resource.py (renamed from service/test/unit/resources/test_account_recovery_resource.py) | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/service/pixelated/resources/account_recovery_resource.py b/service/pixelated/resources/backup_account_resource.py index a69cac9a..5d9cb032 100644 --- a/service/pixelated/resources/account_recovery_resource.py +++ b/service/pixelated/resources/backup_account_resource.py @@ -24,14 +24,14 @@ from twisted.web.http import OK from twisted.web.template import Element, XMLFile, renderElement -class AccountRecoveryPage(Element): - loader = XMLFile(FilePath(os.path.join(get_static_folder(), 'account_recovery.html'))) +class BackupAccountPage(Element): + loader = XMLFile(FilePath(os.path.join(get_static_folder(), 'backup_account.html'))) def __init__(self): - super(AccountRecoveryPage, self).__init__() + super(BackupAccountPage, self).__init__() -class AccountRecoveryResource(BaseResource): +class BackupAccountResource(BaseResource): isLeaf = True def __init__(self, services_factory): @@ -42,5 +42,5 @@ class AccountRecoveryResource(BaseResource): return self._render_template(request) def _render_template(self, request): - site = AccountRecoveryPage() + site = BackupAccountPage() return renderElement(request, site) diff --git a/service/pixelated/resources/root_resource.py b/service/pixelated/resources/root_resource.py index a97bd049..206cb3be 100644 --- a/service/pixelated/resources/root_resource.py +++ b/service/pixelated/resources/root_resource.py @@ -23,7 +23,7 @@ from pixelated.resources import BaseResource, UnAuthorizedResource, UnavailableR from pixelated.resources import get_startup_folder, get_static_folder from pixelated.resources.attachments_resource import AttachmentsResource from pixelated.resources.sandbox_resource import SandboxResource -from pixelated.resources.account_recovery_resource import AccountRecoveryResource +from pixelated.resources.backup_account_resource import BackupAccountResource from pixelated.resources.contacts_resource import ContactsResource from pixelated.resources.features_resource import FeaturesResource from pixelated.resources.feedback_resource import FeedbackResource @@ -89,7 +89,7 @@ class RootResource(BaseResource): return csrf_input and csrf_input == xsrf_token def initialize(self, provider=None, disclaimer_banner=None, authenticator=None): - self._child_resources.add('recovery', AccountRecoveryResource(self._services_factory)) + self._child_resources.add('backup-account', BackupAccountResource(self._services_factory)) self._child_resources.add('sandbox', SandboxResource(self._static_folder)) self._child_resources.add('assets', File(self._static_folder)) self._child_resources.add('keys', KeysResource(self._services_factory)) diff --git a/service/test/unit/resources/test_account_recovery_resource.py b/service/test/unit/resources/test_backup_account_resource.py index 01ffaed2..21ae5aab 100644 --- a/service/test/unit/resources/test_account_recovery_resource.py +++ b/service/test/unit/resources/test_backup_account_resource.py @@ -20,18 +20,18 @@ from mock import MagicMock, patch from twisted.trial import unittest from twisted.web.test.requesthelper import DummyRequest -from pixelated.resources.account_recovery_resource import AccountRecoveryResource +from pixelated.resources.backup_account_resource import BackupAccountResource from test.unit.resources import DummySite -class TestAccountRecoveryResource(unittest.TestCase): +class TestBackupAccountResource(unittest.TestCase): def setUp(self): self.services_factory = MagicMock() - self.resource = AccountRecoveryResource(self.services_factory) + self.resource = BackupAccountResource(self.services_factory) self.web = DummySite(self.resource) def test_get(self): - request = DummyRequest(['/recovery']) + request = DummyRequest(['/backup-account']) request.method = 'GET' d = self.web.get(request) |