replace deprecated uses of assertRaisesRegexp to assertRaisesRegex

pull/68260/head
Landson 5 years ago
parent 228aa603fa
commit cea5fe1655

@ -70,7 +70,7 @@ class TestVaultCli(unittest.TestCase):
mock_setup_vault_secrets.return_value = [] mock_setup_vault_secrets.return_value = []
cli = VaultCLI(args=['ansible-vault', 'view', '/dev/null/foo']) cli = VaultCLI(args=['ansible-vault', 'view', '/dev/null/foo'])
cli.parse() cli.parse()
self.assertRaisesRegexp(errors.AnsibleOptionsError, self.assertRaisesRegex(errors.AnsibleOptionsError,
"A vault password is required to use Ansible's Vault", "A vault password is required to use Ansible's Vault",
cli.run) cli.run)
@ -79,7 +79,7 @@ class TestVaultCli(unittest.TestCase):
mock_setup_vault_secrets.return_value = [] mock_setup_vault_secrets.return_value = []
cli = VaultCLI(args=['ansible-vault', 'encrypt', '/dev/null/foo']) cli = VaultCLI(args=['ansible-vault', 'encrypt', '/dev/null/foo'])
cli.parse() cli.parse()
self.assertRaisesRegexp(errors.AnsibleOptionsError, self.assertRaisesRegex(errors.AnsibleOptionsError,
"A vault password is required to use Ansible's Vault", "A vault password is required to use Ansible's Vault",
cli.run) cli.run)

Loading…
Cancel
Save