Exemplo n.º 1
0
 def test_server_by_name(self, mock_auth):
     '''
     Test for Return information about a server
     '''
     mock_auth.side_effect = MagicMock()
     with patch.object(mock_auth,
                       'server_by_name', MagicMock(return_value='A')):
         self.assertTrue(nova.server_by_name('name'))
Exemplo n.º 2
0
 def test_server_by_name(self):
     '''
     Test for Return information about a server
     '''
     self.mock_auth.side_effect = MagicMock()
     with patch.object(self.mock_auth, 'server_by_name',
                       MagicMock(return_value='A')):
         self.assertTrue(nova.server_by_name('name'))
Exemplo n.º 3
0
 def test_server_by_name(self):
     """
     Test for Return information about a server
     """
     self.mock_auth.side_effect = MagicMock()
     with patch.object(self.mock_auth, "server_by_name",
                       MagicMock(return_value="A")):
         self.assertTrue(nova.server_by_name("name"))