def test_is_running_running(self, mock_config, **kwargs): '''is_running returns true for running instance''' self.assertTrue(DiscoAWS.is_running(self.instance))
def test_is_running_termianted(self, mock_config, **kwargs): '''is_running returns false if instance has terminated''' self.instance.state = "terminated" self.assertFalse(DiscoAWS.is_running(self.instance))
def test_is_running_updates(self, mock_config, **kwargs): '''is_running calls instance update''' DiscoAWS.is_running(self.instance) self.assertEqual(self.instance.update.call_count, 1)
def test_is_running_running(self, mock_config, **kwargs): '''is_running returns true for running instance''' self.assertTrue(DiscoAWS.is_running(self.instance))
def test_is_running_termianted(self, mock_config, **kwargs): '''is_running returns false if instance has terminated''' self.instance.state = "terminated" self.assertFalse(DiscoAWS.is_running(self.instance))
def test_is_running_updates(self, mock_config, **kwargs): '''is_running calls instance update''' DiscoAWS.is_running(self.instance) self.assertEqual(self.instance.update.call_count, 1)