MCPcopy Create free account
hub / github.com/apache/httpd / _class_scope

Method _class_scope

test/modules/http2/test_102_require.py:10–27  ·  view source on GitHub ↗
(self, env)

Source from the content-addressed store, hash-verified

8
9 @pytest.fixture(autouse=True, scope='class')
10 def _class_scope(self, env):
11 domain = f"ssl.{env.http_tld}"
12 conf = H2Conf(env)
13 conf.start_vhost(domains=[domain], port=env.https_port)
14 conf.add("""
15 Protocols h2 http/1.1
16 SSLOptions +StdEnvVars
17 <Location /h2only.html>
18 Require expr \"%{HTTP2} == 'on'\"
19 </Location>
20 <Location /noh2.html>
21 Require expr \"%{HTTP2} == 'off'\"
22 </Location>""")
23 conf.end_vhost()
24 conf.install()
25 # the dir needs to exists for the configuration to have effect
26 env.mkpath(f"{env.server_dir}/htdocs/ssl-client-verify")
27 assert env.apache_restart() == 0
28
29 def test_h2_102_01(self, env):
30 url = env.mkurl("https", "ssl", "/h2only.html")

Callers

nothing calls this directly

Calls 7

start_vhostMethod · 0.95
H2ConfClass · 0.85
addMethod · 0.80
end_vhostMethod · 0.80
installMethod · 0.80
mkpathMethod · 0.80
apache_restartMethod · 0.80

Tested by

no test coverage detected