From c4cffa8e6a532e12e790c9e79ad806376455687e Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Tue, 25 Apr 2017 11:14:29 +0300 Subject: [PATCH] - Updated tests to use the new host fixture in Testinfra 1.6.0. --- tests/test_example.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_example.py b/tests/test_example.py index aaea500..3c308b7 100644 --- a/tests/test_example.py +++ b/tests/test_example.py @@ -3,10 +3,10 @@ from testinfra.utils.ansible_runner import AnsibleRunner testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all') -def test_example(Command): - assert Command('uname').rc == 0 +def test_example(host): + assert host.run('uname').rc == 0 -def test_root(Command, Sudo): - with Sudo(): - assert Command('whoami').stdout.strip() == 'root' +def test_root(host): + with host.sudo(): + assert host.run('whoami').stdout.strip() == 'root' -- GitLab