def test_all_ports_except_80_not_open(scanner, from_port, to_port): ports = range(int(from_port), int(to_port)) ports.remove(80) for port in ports: assert state_of_port(scanner, port) != 'open'
def test_port_80_open(scanner): assert state_of_port(scanner, 80) == 'open'