def test_is_terminal_state_running(self, mock_config, **kwargs): '''is_terminal_state returns false for running instance''' self.assertFalse(DiscoAWS.is_terminal_state(self.instance))
def test_is_terminal_state_termianted(self, mock_config, **kwargs): '''is_terminal_state returns true if instance has terminated or failed to start''' self.instance.state = "terminated" self.assertTrue(DiscoAWS.is_terminal_state(self.instance)) self.instance.state = "failed" self.assertTrue(DiscoAWS.is_terminal_state(self.instance))
def test_is_terminal_state_updates(self, mock_config, **kwargs): '''is_terminal_state calls instance update''' DiscoAWS.is_terminal_state(self.instance) self.assertEqual(self.instance.update.call_count, 1)
def test_is_terminal_state_running(self, mock_config, **kwargs): '''is_terminal_state returns false for running instance''' self.assertFalse(DiscoAWS.is_terminal_state(self.instance))
def test_is_terminal_state_termianted(self, mock_config, **kwargs): '''is_terminal_state returns true if instance has terminated or failed to start''' self.instance.state = "terminated" self.assertTrue(DiscoAWS.is_terminal_state(self.instance)) self.instance.state = "failed" self.assertTrue(DiscoAWS.is_terminal_state(self.instance))
def test_is_terminal_state_updates(self, mock_config, **kwargs): '''is_terminal_state calls instance update''' DiscoAWS.is_terminal_state(self.instance) self.assertEqual(self.instance.update.call_count, 1)