from pyhttpd.env import HttpdTestEnv
-def pytest_report_header(config, startdir):
+def pytest_report_header(config, start_path):
env = HttpdTestEnv()
return f"[apache httpd: {env.get_httpd_version()}, mpm: {env.mpm_module}, {env.prefix}]"
sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))
-def pytest_report_header(config, startdir):
+def pytest_report_header(config, start_path):
env = CoreTestEnv()
return f"core [apache: {env.get_httpd_version()}, mpm: {env.mpm_module}, {env.prefix}]"
from .env import H1TestEnv
-def pytest_report_header(config, startdir):
+def pytest_report_header(config, start_path):
env = H1TestEnv()
return f"mod_http [apache: {env.get_httpd_version()}, mpm: {env.mpm_module}, {env.prefix}]"
from .env import H2TestEnv
-def pytest_report_header(config, startdir):
+def pytest_report_header(config, start_path):
env = H2TestEnv()
return f"mod_h2 [apache: {env.get_httpd_version()}, mpm: {env.mpm_module}, {env.prefix}]"
class H2TestEnv(HttpdTestEnv):
@classmethod
- @property
def is_unsupported(cls):
mpm_module = f"mpm_{os.environ['MPM']}" if 'MPM' in os.environ else 'mpm_event'
return mpm_module == 'mpm_prefork'
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestBasicAlive:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestCurlBasics:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestGet:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestPost:
@pytest.fixture(autouse=True, scope='class')
fd.write("\n")
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestFiles:
URI_PATHS = []
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestAssets:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestSSI:
@pytest.fixture(autouse=True, scope='class')
log = logging.getLogger(__name__)
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestRanges:
LOGFILE = ""
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
@pytest.mark.skipif(not H2TestEnv().h2load_is_at_least('1.41.0'), reason="h2load misses --connect-to option")
class TestTiming:
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestConnReuse:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
@pytest.mark.skipif(H2TestEnv.get_ssl_module() != "mod_ssl", reason="only for mod_ssl")
class TestSslRenegotiation:
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestRequire:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestUpgrade:
@pytest.fixture(autouse=True, scope='class')
return ((payload + 9 + mask) & ~mask) - (payload + 9)
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestPadding:
@pytest.fixture(autouse=True, scope='class')
from pyhttpd.result import ExecResult
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestShutdown:
@pytest.fixture(autouse=True, scope='class')
fd.write("\n")
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestFrameLengths:
URI_PATHS = []
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestInvalidHeaders:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestConditionalHeaders:
@pytest.fixture(autouse=True, scope='class')
# The trailer tests depend on "nghttp" as no other client seems to be able to send those
# rare things.
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestTrailers:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestRfc9113:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestInterimResponses:
@pytest.fixture(autouse=True, scope='class')
# The push tests depend on "nghttp"
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestPush:
@pytest.fixture(autouse=True, scope='class')
# The push tests depend on "nghttp"
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestEarlyHints:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestProxy:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestProxyServerHeader:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestProxyPort:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestProxyFwd:
@classmethod
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestH2Proxy:
def test_h2_600_01(self, env):
log = logging.getLogger(__name__)
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestH2ProxyTwisted:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
@pytest.mark.skipif(not H2TestEnv().h2load_is_at_least('1.41.0'),
reason="h2load misses --connect-to option")
class TestLoadGet:
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestLoadPostStatic:
@pytest.fixture(autouse=True, scope='class')
from .env import H2Conf, H2TestEnv
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestLoadCgi:
@pytest.fixture(autouse=True, scope='class')
from pyhttpd.curl import CurlPiper
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
class TestBuffering:
@pytest.fixture(autouse=True, scope='class')
stdout=b'', stderr=b'', duration=end - start), infos, frames
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
+@pytest.mark.skipif(condition=H2TestEnv.is_unsupported(), reason="mod_http2 not supported here")
@pytest.mark.skipif(condition=not H2TestEnv().httpd_is_at_least("2.4.60"),
reason=f'need at least httpd 2.4.60 for this')
@pytest.mark.skipif(condition=ws_version < ws_version_min,
sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))
-def pytest_report_header(config, startdir):
+def pytest_report_header(config, start_path):
env = ProxyTestEnv()
return "mod_proxy: [apache: {aversion}({prefix})]".format(
prefix=env.prefix,