summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2023-04-27 12:43:35 -0700
committerGitHub <noreply@github.com>2023-04-27 12:43:35 -0700
commit71f6e10dae7c862f1e7f02063d4def18f0d44e44 (patch)
tree34b951095c41feac8fcbf18dd753bf454411c4f8
parent058b722a54ed89e613287e1ac07d616863d7a14b (diff)
downloadansible-71f6e10dae7c862f1e7f02063d4def18f0d44e44.tar.gz
Use assertRaisesRegex in unit test (#80663)
-rw-r--r--test/units/cli/test_vault.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/units/cli/test_vault.py b/test/units/cli/test_vault.py
index 1be29d9ca1..d2fce7a912 100644
--- a/test/units/cli/test_vault.py
+++ b/test/units/cli/test_vault.py
@@ -171,9 +171,9 @@ class TestVaultCli(unittest.TestCase):
mock_setup_vault_secrets.return_value = [('default', TextVaultSecret('password'))]
cli = VaultCLI(args=['ansible-vault', 'create', '/dev/null/foo'])
cli.parse()
- self.assertRaisesRegexp(errors.AnsibleOptionsError,
- "not a tty, editor cannot be opened",
- cli.run)
+ self.assertRaisesRegex(errors.AnsibleOptionsError,
+ "not a tty, editor cannot be opened",
+ cli.run)
@patch('ansible.cli.vault.VaultCLI.setup_vault_secrets')
@patch('ansible.cli.vault.VaultEditor')