From 77e374ecca7f1d5ded1c6d20059d2ff8a05e23a6 Mon Sep 17 00:00:00 2001 From: Caio Carrara Date: Wed, 13 Apr 2016 16:53:40 -0300 Subject: Issue #674: Update Account usage to pass user_id There is an update on leap_mail where an user id became required to create an Account. So, this change update the Account usage on user agent to pass this parameter. --- service/pixelated/bitmask_libraries/session.py | 6 +++--- service/test/support/integration/app_test_client.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/service/pixelated/bitmask_libraries/session.py b/service/pixelated/bitmask_libraries/session.py index d575a9c6..095f23cc 100644 --- a/service/pixelated/bitmask_libraries/session.py +++ b/service/pixelated/bitmask_libraries/session.py @@ -73,7 +73,7 @@ class LeapSession(object): @defer.inlineCallbacks def after_first_sync(self): yield self.nicknym.generate_openpgp_key() - yield self._create_account(self.soledad) + yield self._create_account(self.soledad, self.user_auth.uuid) self.incoming_mail_fetcher = yield self._create_incoming_mail_fetcher( self.nicknym, self.soledad, @@ -81,8 +81,8 @@ class LeapSession(object): self.account_email()) reactor.callFromThread(self.incoming_mail_fetcher.startService) - def _create_account(self, soledad): - self.account = Account(soledad) + def _create_account(self, soledad, user_id): + self.account = Account(soledad, user_id) return self.account.deferred_initialization def _set_fresh_account(self, event, email_address): diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py index 95facec0..49f0552a 100644 --- a/service/test/support/integration/app_test_client.py +++ b/service/test/support/integration/app_test_client.py @@ -111,7 +111,7 @@ class AppTestAccount(object): shutil.rmtree(soledad_test_folder) def _initialize_account(self): - self.account = Account(self.soledad) + self.account = Account(self.soledad, self._user_id) return self.account.deferred_initialization def _create_mail_service(self, mail_sender, mail_store, search_engine, attachment_store): -- cgit v1.2.3