summaryrefslogtreecommitdiff
path: root/service/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'service/test/unit')
-rw-r--r--service/test/unit/resources/test_backup_account_resource.py8
-rw-r--r--service/test/unit/resources/test_base_resource.py8
2 files changed, 7 insertions, 9 deletions
diff --git a/service/test/unit/resources/test_backup_account_resource.py b/service/test/unit/resources/test_backup_account_resource.py
index b8654203..e5e2793a 100644
--- a/service/test/unit/resources/test_backup_account_resource.py
+++ b/service/test/unit/resources/test_backup_account_resource.py
@@ -59,7 +59,7 @@ class TestBackupAccountResource(unittest.TestCase):
self.resource._authenticator.bonafide_session,
self.resource.soledad(request),
self.resource._service(request, '_leap_session').smtp_config,
- self.resource.get_backup_email(request))
+ self.resource._get_backup_email(request))
mock_account_recovery.update_recovery_code.assert_called()
d.addCallback(assert_update_recovery_code_called)
@@ -94,3 +94,9 @@ class TestBackupAccountResource(unittest.TestCase):
d.addCallback(assert_successful_response)
return d
+
+ def test_get_backup_email_from_request(self):
+ request = MagicMock()
+ request.content.getvalue.return_value = '{"backupEmail": "test@test.com"}'
+
+ self.assertEqual(self.resource._get_backup_email(request), 'test@test.com')
diff --git a/service/test/unit/resources/test_base_resource.py b/service/test/unit/resources/test_base_resource.py
index d7110917..35ae67c7 100644
--- a/service/test/unit/resources/test_base_resource.py
+++ b/service/test/unit/resources/test_base_resource.py
@@ -25,11 +25,3 @@ class TestBaseResource(unittest.TestCase):
base_resource = BaseResource(mock_services_factory)
self.assertEqual(base_resource.soledad('request'), mock_services_factory.services()._leap_session.soledad)
-
- def test_get_backup_email_from_request(self):
- mock_services_factory = MagicMock()
- request = MagicMock()
- request.content.getvalue.return_value = '{"backupEmail": "test@test.com"}'
- base_resource = BaseResource(mock_services_factory)
-
- self.assertEqual(base_resource.get_backup_email(request), 'test@test.com')