def test_update_state(self):
        self.view.set_state( 'Running' )
        import degras.image as im
        expected_image = im.get_jobstate_image('Running')

        ret_state, ret_image = self.view.get_state()
        assert_equal(ret_state, 'Running')
        assert_equal(ret_image, expected_image)
    def test_state_and_image(self):
        import degras.image as im

        for state in im.JOBSTATE_PATH_DICT.keys():
            image = im.get_jobstate_image(state)
            # set state
            self.view.set_state( state )
            ret_state, ret_image = self.view.get_state()
            assert_equal(ret_state, state)
            assert_equal(ret_image, image)
Ejemplo n.º 3
0
 def set_state(self, state):
     self.__state = state
     self.__image = im.get_jobstate_image(state)