Example #1
0
 def setUp(self):
     super(IntegrationTestCase, self).setUp()
     self.portal = self.layer['portal']
     self.request = self.layer['request']
     self.deactivate_extjs()
     map(self.activate_feature, self.features)
     if 'activity' in self.features:
         Mailing(self.portal).set_up()
         insert_notification_defaults(self.portal)
 def setUp(self):
     super(IntegrationTestCase, self).setUp()
     self.portal = self.layer['portal']
     self.request = self.layer['request']
     self.deactivate_extjs()
     map(self.activate_feature, self.features)
     if 'activity' in self.features:
         Mailing(self.portal).set_up()
         insert_notification_defaults(self.portal)
Example #3
0
    def setUp(self):
        super(TestNotifactionCenterErrorHandling, self).setUp()
        insert_notification_defaults(self.portal)
        create(
            Builder('user').having(firstname='Hugo',
                                   lastname='Boss').with_userid('hugo.boss'))

        setRoles(self.portal, 'hugo.boss', ['Contributor', 'Editor', 'Reader'])
        transaction.commit()

        self.dossier = create(Builder('dossier').titled(u'Dossier A'))
Example #4
0
    def setUp(self):
        super(TestNotifactionCenterErrorHandling, self).setUp()
        insert_notification_defaults(self.portal)
        create(Builder('user')
               .having(firstname='Hugo', lastname='Boss')
               .with_userid('hugo.boss'))

        setRoles(self.portal, 'hugo.boss',
                 ['Contributor', 'Editor', 'Reader'])
        transaction.commit()

        self.dossier = create(Builder('dossier').titled(u'Dossier A'))
    def setUp(self):
        super(TestTaskReassignActivity, self).setUp()
        insert_notification_defaults(self.portal)
        Mailing(self.portal).set_up()

        self.dossier = create(Builder('dossier').titled(u'Dossier XY'))
        self.hugo = create(
            Builder('ogds_user').id('hugo.boss').assign_to_org_units(
                [self.org_unit]).having(firstname=u'Hugo',
                                        lastname=u'Boss',
                                        email='*****@*****.**'))

        create(
            Builder('ogds_user').id('peter.meier').assign_to_org_units(
                [self.org_unit]).having(firstname=u'Peter', lastname=u'Meier'))
        create(
            Builder('ogds_user').id('james.meier').assign_to_org_units(
                [self.org_unit]).having(firstname=u'James', lastname=u'Meier'))
Example #6
0
    def setUp(self):
        super(TestTaskReassignActivity, self).setUp()
        insert_notification_defaults(self.portal)
        Mailing(self.portal).set_up()

        self.dossier = create(Builder('dossier').titled(u'Dossier XY'))
        self.hugo = create(Builder('ogds_user')
                           .id('hugo.boss')
                           .assign_to_org_units([self.org_unit])
                           .having(firstname=u'Hugo', lastname=u'Boss',
                                   email='*****@*****.**'))

        create(Builder('ogds_user')
               .id('peter.meier')
               .assign_to_org_units([self.org_unit])
               .having(firstname=u'Peter', lastname=u'Meier'))
        create(Builder('ogds_user')
               .id('james.meier')
               .assign_to_org_units([self.org_unit])
               .having(firstname=u'James', lastname=u'Meier'))
Example #7
0
    def setUp(self):
        super(TestEmailNotification, self).setUp()
        # setup mail
        Mailing(self.portal).set_up()

        self.hugo = create(
            Builder("ogds_user")
            .assign_to_org_units([self.org_unit])
            .having(userid="hugo.boss", firstname="Hugo", lastname="Boss", email="*****@*****.**")
        )

        self.franz = create(
            Builder("ogds_user")
            .assign_to_org_units([self.org_unit])
            .having(userid="franz.michel", firstname="Franz", lastname="Michel", email="*****@*****.**")
        )

        create(Builder("watcher").having(actorid="hugo.boss"))

        self.dossier = create(Builder("dossier").titled(u"Dossier A"))

        insert_notification_defaults(self.portal)
Example #8
0
    def setUp(self):
        # Overridden - don't perform IntegrationTestCase's usual setup,
        # because that would replace the MailHost with a mock. We need the
        # real one's data manager though to reproduce the issue with the
        # test below
        super(IntegrationTestCase, self).setUp()
        self.portal = self.layer['portal']
        self.request = self.layer['request']
        self.deactivate_extjs()
        map(self.parse_feature, self.features)
        if 'activity' in self.features:
            insert_notification_defaults(self.portal)

        task_responsible = self.regular_user
        create(Builder('watcher').having(actorid=task_responsible.id))

        # Make sure mails to responsible are enabled for task added
        create(Builder('notification_setting')
               .having(kind='task-added',
                       userid=task_responsible.id,
                       mail_notification_roles=[TASK_RESPONSIBLE_ROLE],
                       badge_notification_roles=[],
                       digest_notification_roles=[]))
Example #9
0
    def setUp(self):
        super(TestEmailNotification, self).setUp()
        # setup mail
        Mailing(self.portal).set_up()

        self.hugo = create(Builder('ogds_user')
                           .assign_to_org_units([self.org_unit])
                           .having(userid='hugo.boss',
                                   firstname='Hugo',
                                   lastname='Boss',
                                   email='*****@*****.**'))

        self.franz = create(Builder('ogds_user')
               .assign_to_org_units([self.org_unit])
               .having(userid='franz.michel',
                       firstname='Franz',
                       lastname='Michel',
                       email='*****@*****.**'))

        create(Builder('watcher').having(actorid='hugo.boss'))

        self.dossier = create(Builder('dossier').titled(u'Dossier A'))

        insert_notification_defaults(self.portal)
Example #10
0
    def setUp(self):
        # Overridden - don't perform IntegrationTestCase's usual setup,
        # because that would replace the MailHost with a mock. We need the
        # real one's data manager though to reproduce the issue with the
        # test below
        super(IntegrationTestCase, self).setUp()
        self.portal = self.layer['portal']
        self.request = self.layer['request']
        self.deactivate_extjs()
        map(self.parse_feature, self.features)
        if 'activity' in self.features:
            insert_notification_defaults(self.portal)

        task_responsible = self.regular_user
        create(Builder('watcher').having(actorid=task_responsible.id))

        # Make sure mails to responsible are enabled for task added
        create(
            Builder('notification_setting').having(
                kind='task-added',
                userid=task_responsible.id,
                mail_notification_roles=[TASK_RESPONSIBLE_ROLE],
                badge_notification_roles=[],
                digest_notification_roles=[]))