def test_appraisal_is_in_complete_when_not_all_dossiers_are_appraised(self):
        dossier3 = create(Builder('dossier')
                          .having(archival_value=ARCHIVAL_VALUE_SAMPLING)
                          .as_expired()
                          .within(self.repository))

        disposition = create(Builder('disposition')
                             .having(dossiers=[self.dossier1,
                                               self.dossier2,
                                               dossier3])
                             .within(self.root))

        appraisal = IAppraisal(disposition)
        self.assertFalse(appraisal.is_complete())

        appraisal.update(dossier=dossier3, archive=True)
        self.assertTrue(appraisal.is_complete())
Beispiel #2
0
    def test_appraisal_is_in_complete_when_not_all_dossiers_are_appraised(
            self):
        dossier3 = create(
            Builder('dossier').having(
                archival_value=ARCHIVAL_VALUE_SAMPLING).as_expired().within(
                    self.repository))

        disposition = create(
            Builder('disposition').having(
                dossiers=[self.dossier1, self.dossier2, dossier3]).within(
                    self.root))

        appraisal = IAppraisal(disposition)
        self.assertFalse(appraisal.is_complete())

        appraisal.update(dossier=dossier3, archive=True)
        self.assertTrue(appraisal.is_complete())
Beispiel #3
0
    def test_appraisal_is_incomplete_when_not_all_dossiers_are_appraised(self):
        self.login(self.records_manager)
        self.set_workflow_state("dossier-state-resolved", self.dossier, self.empty_dossier)
        ILifeCycle(self.expired_dossier).archival_value = ARCHIVAL_VALUE_WORTHY
        ILifeCycle(self.empty_dossier).archival_value = ARCHIVAL_VALUE_UNWORTHY
        ILifeCycle(self.dossier).archival_value = ARCHIVAL_VALUE_SAMPLING

        disposition = create(Builder('disposition')
                             .having(dossiers=[self.expired_dossier,
                                               self.empty_dossier,
                                               self.dossier])
                             .within(self.repository_root))

        appraisal = IAppraisal(disposition)
        self.assertFalse(appraisal.is_complete())

        appraisal.update(dossier=self.dossier, archive=True)
        self.assertTrue(appraisal.is_complete())