From a3763301042c5db0231b0e9e2d4a62d41d374d49 Mon Sep 17 00:00:00 2001 From: Anike Arni Date: Wed, 19 Apr 2017 13:51:47 -0300 Subject: [#927] Adds date to recovery code email with @deniscostadsc --- service/test/unit/test_account_recovery.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'service/test/unit') diff --git a/service/test/unit/test_account_recovery.py b/service/test/unit/test_account_recovery.py index e595fc5a..cb5ed520 100644 --- a/service/test/unit/test_account_recovery.py +++ b/service/test/unit/test_account_recovery.py @@ -85,11 +85,13 @@ class AccountRecoveryTest(unittest.TestCase): mock_resource.assert_called_once_with('pixelated.assets', 'recovery.mail.pt-BR') + @patch('pixelated.account_recovery.formatdate') @patch('pixelated.account_recovery.smtp.sendmail') @patch('pixelated.account_recovery.pkg_resources.resource_filename') @defer.inlineCallbacks - def test_send_recovery_code_by_email(self, mock_resource, mock_sendmail): + def test_send_recovery_code_by_email(self, mock_resource, mock_sendmail, mock_formatdate): mock_sendmail.return_value = defer.succeed(None) + mock_formatdate.return_value = 'Sat, 21 Mar 2015 19:30:09 -0300' sender = 'team@{}'.format(self.domain) mock_file_content = '{backup_email}, {sender}, {date}, {domain}, {recovery_code}, {account_recovery_url}' -- cgit v1.2.3