Ejemplo n.º 1
0
 def test_ignored_job_states(self):
     ignored = []
     for start_state, end_state in states._ALLOWED_JOB_TRANSITIONS:
         ignored.append((start_state, start_state))
         ignored.append((end_state, end_state))
     for start_state, end_state in ignored:
         self.assertFalse(states.check_job_transition(start_state,
                                                      end_state))
Ejemplo n.º 2
0
 def test_ignored_job_states(self):
     ignored = []
     for start_state, end_state in states._ALLOWED_JOB_TRANSITIONS:
         ignored.append((start_state, start_state))
         ignored.append((end_state, end_state))
     for start_state, end_state in ignored:
         self.assertFalse(
             states.check_job_transition(start_state, end_state))
Ejemplo n.º 3
0
 def state(self):
     current_state = self._fetch_state()
     if self._last_state is not None:
         states.check_job_transition(self._last_state, current_state)
     self._last_state = current_state
     return current_state
Ejemplo n.º 4
0
 def state(self):
     current_state = self._fetch_state()
     if self._last_state is not None:
         states.check_job_transition(self._last_state, current_state)
     self._last_state = current_state
     return current_state
Ejemplo n.º 5
0
 def test_valid_job_states(self):
     for start_state, end_state in states._ALLOWED_JOB_TRANSITIONS:
         self.assertTrue(states.check_job_transition(start_state,
                                                     end_state))
Ejemplo n.º 6
0
 def test_valid_job_states(self):
     for start_state, end_state in states._ALLOWED_JOB_TRANSITIONS:
         self.assertTrue(states.check_job_transition(
             start_state, end_state))