diff --git a/roles/bootstrap/molecule/default/tests/test_parameters_mandatory.py b/roles/bootstrap/molecule/default/tests/test_parameters_mandatory.py index f62b306a52a5d47d7dd3941686a30744becdc33e..466990b6b47ece302b2ba6fd7318c8aa15335b1b 100644 --- a/roles/bootstrap/molecule/default/tests/test_parameters_mandatory.py +++ b/roles/bootstrap/molecule/default/tests/test_parameters_mandatory.py @@ -14,7 +14,7 @@ def test_authorized_keys(host): with host.sudo(): - ssh_key = open(os.path.expanduser('~/.ssh/id_rsa.pub'), 'read').read().strip() + ssh_key = open(os.path.expanduser('~/.ssh/id_rsa.pub'), 'r').read().strip() authorized_keys = host.file('/home/ansible/.ssh/authorized_keys') assert authorized_keys.is_file @@ -28,6 +28,6 @@ def test_root_authorized_keys(host): with host.sudo(): - ssh_key = open(os.path.expanduser('~/.ssh/id_rsa.pub'), 'read').read().strip() + ssh_key = open(os.path.expanduser('~/.ssh/id_rsa.pub'), 'r').read().strip() assert ssh_key not in host.file('/root/.ssh/authorized_keys').content_string