|
|
@ -171,9 +171,9 @@ class TestVaultCli(unittest.TestCase):
|
|
|
|
mock_setup_vault_secrets.return_value = [('default', TextVaultSecret('password'))]
|
|
|
|
mock_setup_vault_secrets.return_value = [('default', TextVaultSecret('password'))]
|
|
|
|
cli = VaultCLI(args=['ansible-vault', 'create', '/dev/null/foo'])
|
|
|
|
cli = VaultCLI(args=['ansible-vault', 'create', '/dev/null/foo'])
|
|
|
|
cli.parse()
|
|
|
|
cli.parse()
|
|
|
|
self.assertRaisesRegexp(errors.AnsibleOptionsError,
|
|
|
|
self.assertRaisesRegex(errors.AnsibleOptionsError,
|
|
|
|
"not a tty, editor cannot be opened",
|
|
|
|
"not a tty, editor cannot be opened",
|
|
|
|
cli.run)
|
|
|
|
cli.run)
|
|
|
|
|
|
|
|
|
|
|
|
@patch('ansible.cli.vault.VaultCLI.setup_vault_secrets')
|
|
|
|
@patch('ansible.cli.vault.VaultCLI.setup_vault_secrets')
|
|
|
|
@patch('ansible.cli.vault.VaultEditor')
|
|
|
|
@patch('ansible.cli.vault.VaultEditor')
|
|
|
|