Exemple #1
0
    def test_add_welcome_mail(self):
        mail_store = mock()
        input_mail = self._get_welcome_mail()

        add_welcome_mail(mail_store)
        capture = WelcomeMailCapture()

        verify(mail_store).add_mail('INBOX', capture)
        capture.assert_mail(input_mail.raw)
    def test_add_welcome_mail(self):
        mail_store = mock()
        input_mail = self._get_welcome_mail()

        add_welcome_mail(mail_store)
        capture = WelcomeMailCapture()

        verify(mail_store).add_mail("INBOX", capture)
        capture.assert_mail(input_mail.raw)
    def _setup_user_services(self, leap_session, request):
        user_id = leap_session.user_auth.uuid
        if not self._services_factory.has_session(user_id):
            yield self._services_factory.create_services_from(leap_session)
            self._services_factory.map_email(self.creds.username, user_id)

        if leap_session.fresh_account:
            yield add_welcome_mail(leap_session.mail_store)

        self._init_http_session(request, user_id)
Exemple #4
0
def start_user_agent_in_single_user_mode(
        root_resource, services_factory, leap_home, leap_session):
    log.msg('Bootstrap done, loading services for user %s'
            % leap_session.userid)

    _services = services.Services(leap_session)
    yield _services.setup()

    if leap_session.fresh_account:
        yield add_welcome_mail(leap_session.mail_store)

    services_factory.add_session(leap_session.user_auth.uuid, _services)
    root_resource.initialize()
    log.msg('Done, the user agent is ready to be used')
Exemple #5
0
def start_user_agent_in_single_user_mode(root_resource, services_factory,
                                         leap_home, leap_session):
    log.msg('Bootstrap done, loading services for user %s' %
            leap_session.userid)

    _services = services.Services(leap_session)
    yield _services.setup()

    if leap_session.fresh_account:
        yield add_welcome_mail(leap_session.mail_store)

    services_factory.add_session(leap_session.user_auth.uuid, _services)
    root_resource.initialize()
    log.msg('Done, the user agent is ready to be used')
def start_user_agent_in_single_user_mode(root_resource, services_factory, leap_home, leap_session):
    log.info('Bootstrap done, loading services for user %s' % leap_session.user_auth.username)

    _services = services.Services(leap_session)
    yield _services.setup()

    if leap_session.fresh_account:
        yield add_welcome_mail(leap_session.mail_store)

    services_factory.add_session(leap_session.user_auth.uuid, _services)

    root_resource.initialize()

    # soledad needs lots of threads
    reactor.getThreadPool().adjustPoolsize(5, 15)
    log.info('Done, the user agent is ready to be used')
Exemple #7
0
def start_user_agent_in_single_user_mode(root_resource, services_factory, leap_home, leap_session):
    log.info('Bootstrap done, loading services for user %s' % leap_session.user_auth.username)

    _services = services.Services(leap_session)
    yield _services.setup()

    if leap_session.fresh_account:
        yield add_welcome_mail(leap_session.mail_store)

    services_factory.add_session(leap_session.user_auth.uuid, _services)

    root_resource.initialize()

    # soledad needs lots of threads
    reactor.getThreadPool().adjustPoolsize(5, 15)
    log.info('Done, the user agent is ready to be used')
    def _initialize_services(self, leap_session):
        yield self._services_factory.create_services_from(leap_session)

        if leap_session.fresh_account:
            yield add_welcome_mail(leap_session.mail_store)
    def _initialize_services(self, leap_session):
        yield self._services_factory.create_services_from(leap_session)

        if leap_session.fresh_account:
            yield add_welcome_mail(leap_session.mail_store)
Exemple #10
0
 def _add_welcome_email(self, leap_session, language):
     if leap_session.fresh_account:
         yield add_welcome_mail(leap_session.mail_store, language)
    def _initialize_after_login(self, services_factory, leap_user):
        session = leap_user.leap_session
        yield services_factory.create_services_from(session)

        if session.fresh_account:
            yield add_welcome_mail(session.mail_store)
Exemple #12
0
 def _add_welcome_email(self, leap_session, language):
     if leap_session.fresh_account:
         yield add_welcome_mail(leap_session.mail_store, language)