import pytest

@pytest.mark.parametrize("name", [
  ("bash-completion"),
  ("bind-utils"),
  ("bridge-utils"),
  ("docker"),
  ("epel-release"),
  ("git"),
  ("iptables-services"),
  ("libnfsidmap"),
  ("net-tools"),
  ("nfs-utils"),
  ("pyOpenSSL"),
  ("screen"),
  ("strace"),
  ("tcpdump"),
  ("wget"),
])

def test_packages(Package, name):
  assert Package(name).is_installed

import pytest

@pytest.mark.parametrize("name", [
  ("bash-completion"),
  ("bind-utils"),
  ("bridge-utils"),
  ("docker"),
  ("epel-release"),
  ("git"),
  ("iptables-services"),
  ("libnfsidmap"),
  ("net-tools"),
  ("nfs-utils"),
  ("pyOpenSSL"),
  ("screen"),
  ("strace"),
  ("tcpdump"),
  ("wget"),
])

def test_packages(host, name):
  pkg = host.package(name)
  assert pkg.is_installed

Rework based on examples in docs
Rework based on examples in docs

  import pytest
  
  @pytest.mark.parametrize("name", [
    ("bash-completion"),
    ("bind-utils"),
    ("bridge-utils"),
    ("docker"),
    ("epel-release"),
    ("git"),
    ("iptables-services"),
    ("libnfsidmap"),
    ("net-tools"),
    ("nfs-utils"),
    ("pyOpenSSL"),
    ("screen"),
    ("strace"),
    ("tcpdump"),
    ("wget"),
  ])
  
- def test_packages(Package, name):
+ def test_packages(host, name):
+   pkg = host.package(name)
-   assert Package(name).is_installed
+   assert pkg.is_installed
  
Rework based on examples in docs
## Code Before:
import pytest

@pytest.mark.parametrize("name", [
  ("bash-completion"),
  ("bind-utils"),
  ("bridge-utils"),
  ("docker"),
  ("epel-release"),
  ("git"),
  ("iptables-services"),
  ("libnfsidmap"),
  ("net-tools"),
  ("nfs-utils"),
  ("pyOpenSSL"),
  ("screen"),
  ("strace"),
  ("tcpdump"),
  ("wget"),
])

def test_packages(Package, name):
  assert Package(name).is_installed

## Instruction:
Rework based on examples in docs
## Code After:
import pytest

@pytest.mark.parametrize("name", [
  ("bash-completion"),
  ("bind-utils"),
  ("bridge-utils"),
  ("docker"),
  ("epel-release"),
  ("git"),
  ("iptables-services"),
  ("libnfsidmap"),
  ("net-tools"),
  ("nfs-utils"),
  ("pyOpenSSL"),
  ("screen"),
  ("strace"),
  ("tcpdump"),
  ("wget"),
])

def test_packages(host, name):
  pkg = host.package(name)
  assert pkg.is_installed
