Loading tests/test_example.py +5 −5 Original line number Diff line number Diff line Loading @@ -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' Loading
tests/test_example.py +5 −5 Original line number Diff line number Diff line Loading @@ -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'