Exemplo n.º 1
0
 def test_is_running_running(self, mock_config, **kwargs):
     '''is_running returns true for running instance'''
     self.assertTrue(DiscoAWS.is_running(self.instance))
Exemplo n.º 2
0
 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))
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 def test_is_running_running(self, mock_config, **kwargs):
     '''is_running returns true for running instance'''
     self.assertTrue(DiscoAWS.is_running(self.instance))
Exemplo n.º 5
0
 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))
Exemplo n.º 6
0
 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)