Use assertRaisesRegex in unit test (#80663)

pull/80668/head
Matt Clay 2 years ago committed by GitHub
parent 058b722a54
commit 71f6e10dae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -171,7 +171,7 @@ 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,
self.assertRaisesRegex(errors.AnsibleOptionsError,
"not a tty, editor cannot be opened",
cli.run)

Loading…
Cancel
Save