Exemplo n.º 1
0

        
Exemplo n.º 2
0
    def test_lists_only_tasks_assigned_to_the_current_org_units_inbox(self):
        forwarding_1 = create(Builder('forwarding')
                              .within(self.inbox)
                              .having(responsible='inbox:client1'))
        forwarding_2 = create(Builder('forwarding')
                              .within(self.inbox)
                              .having(responsible='inbox:client2'))

        self.assert_listing_results([forwarding_1])

        select_current_org_unit('client2')
        self.assert_listing_results([forwarding_2])
Exemplo n.º 3
0
    def test_list_only_task_with_current_org_units_inbox_as_a_issuer(self):
        task1 = create(Builder('task')
                      .within(self.inbox)
                      .having(issuer='inbox:client1'))

        task2 = create(Builder('task')
                      .within(self.inbox)
                      .having(issuer='inbox:client2'))

        self.assert_listing_results([task1])

        select_current_org_unit('client2')
        self.assert_listing_results([task2])
Exemplo n.º 4
0
    def test_lists_only_tasks_assigned_to_the_current_org_units_inbox(self):
        self.login(self.secretariat_user)

        view = self.inbox.restrictedTraverse(
            'tabbedview_view-{}'.format(self.viewname))
        view.update()

        self.assertEquals(
            [self.inbox_task.get_sql_object()], view.contents)

        select_current_org_unit('rk')
        view.update()
        self.assertEquals([], view.contents)
    def setUp(self):
        super(TestDossierDetails, self).setUp()
        self.user = create(
            Builder('ogds_user').having(
                firstname='t\xc3\xa4st'.decode('utf-8'), lastname=u'User'))
        self.admin_unit = create(
            Builder('admin_unit').as_current_admin_unit().having(
                title=u'Regierungsrat'))
        self.org_unit = create(
            Builder('org_unit').having(
                title=u'Regierungsrat',
                admin_unit=self.admin_unit).with_default_groups().assign_users(
                    [self.user]))

        select_current_org_unit(self.org_unit.id())
Exemplo n.º 6
0
    def setUp(self):
        super(TestDossierDetails, self).setUp()
        self.user = create(Builder('ogds_user')
                           .having(firstname='t\xc3\xa4st'.decode('utf-8'),
                                   lastname=u'User'))
        self.admin_unit = create(Builder('admin_unit')
                                 .as_current_admin_unit()
                                 .having(title=u'Regierungsrat'))
        self.org_unit = create(Builder('org_unit')
                               .having(title=u'Regierungsrat',
                                       admin_unit=self.admin_unit)
                               .with_default_groups()
                               .assign_users([self.user]))

        select_current_org_unit(self.org_unit.id())