def test_keypair_add(self, mock_auth): ''' Test for Add a keypair to nova (nova keypair-add) ''' mock_auth.side_effect = MagicMock() with patch.object(mock_auth, 'keypair_add', MagicMock(return_value='A')): self.assertTrue(nova.keypair_add('name'))
def test_keypair_add(self): ''' Test for Add a keypair to nova (nova keypair-add) ''' self.mock_auth.side_effect = MagicMock() with patch.object(self.mock_auth, 'keypair_add', MagicMock(return_value='A')): self.assertTrue(nova.keypair_add('name'))
def test_keypair_add(self): """ Test for Add a keypair to nova (nova keypair-add) """ self.mock_auth.side_effect = MagicMock() with patch.object(self.mock_auth, "keypair_add", MagicMock(return_value="A")): self.assertTrue(nova.keypair_add("name"))