Project

General

Profile

« Previous | Next » 

Revision 08bf3477

Added by Mikaël Ates (de retour le 5 mars) about 11 years ago

actes: add two new validation states.

View differences:

calebasse/actes/tests.py
62 62
        act_event6.act.set_state('VALIDE', creator)
63 63

  
64 64
        result = automated_validation(date(2020, 10, 2), service, creator, commit=False)
65
        self.assertEqual(result, (5,2,2,0,1,0,0,0,0,0))
65
        self.assertEqual(result, (5,2,2,0,1,0,0,0,0,0,0,0))
66 66
        self.assertTrue(act_event.act.is_state('NON_VALIDE'))
67 67
        self.assertTrue(act_event2.act.is_state('NON_VALIDE'))
68 68
        self.assertTrue(act_event3.act.is_state('ABS_EXC'))
......
71 71
        self.assertTrue(act_event6.act.is_state('VALIDE'))
72 72

  
73 73
        result = automated_validation(date(2020, 10, 2), service, creator)
74
        self.assertEqual(result, (5,2,2,0,1,0,0,0,0,0))
74
        self.assertEqual(result, (5,2,2,0,1,0,0,0,0,0,0,0))
75 75

  
76 76
        self.assertTrue(act_event.act.is_state('VALIDE'))
77 77
        self.assertTrue(act_event2.act.is_state('ACT_DOUBLE'))
......
87 87
            [date(2020, 10, 3), date(2020, 10, 4)])
88 88

  
89 89
        result = automated_validation(datetime(2020, 10, 2, 12, 20), service, creator, commit=False)
90
        self.assertEqual(result, (5,2,2,0,1,0,0,0,0,0))
90
        self.assertEqual(result, (5,2,2,0,1,0,0,0,0,0,0,0))
91 91
        self.assertTrue(act_event.act.is_state('VALIDE'))
92 92
        self.assertTrue(act_event2.act.is_state('ACT_DOUBLE'))
93 93
        self.assertTrue(act_event3.act.is_state('ABS_EXC'))
......
96 96
        self.assertTrue(act_event6.act.is_state('ACT_DOUBLE'))
97 97

  
98 98
        result = automated_validation(datetime(2020, 10, 2, 12, 20), service, creator)
99
        self.assertEqual(result, (5,2,2,0,1,0,0,0,0,0))
99
        self.assertEqual(result, (5,2,2,0,1,0,0,0,0,0,0,0))
100 100
        self.assertTrue(act_event.act.is_state('VALIDE'))
101 101
        self.assertTrue(act_event2.act.is_state('ACT_DOUBLE'))
102 102
        self.assertTrue(act_event3.act.is_state('ABS_EXC'))
......
105 105
        self.assertTrue(act_event6.act.is_state('ACT_DOUBLE'))
106 106

  
107 107
        result = automated_validation(datetime(2020, 10, 2, 12, 20), service, creator, commit=False)
108
        self.assertEqual(result, (5,2,2,0,1,0,0,0,0,0))
108
        self.assertEqual(result, (5,2,2,0,1,0,0,0,0,0,0,0))
109 109
        self.assertTrue(act_event.act.is_state('VALIDE'))
110 110
        self.assertTrue(act_event2.act.is_state('ACT_DOUBLE'))
111 111
        self.assertTrue(act_event3.act.is_state('ABS_EXC'))

Also available in: Unified diff