source: mod_gnutls/test/tests/27_OCSP_server/hooks.py

mod_gnutls/0.11.0
Last change on this file was 0f52d48, checked in by Fiona Klute <fiona.klute@…>, 7 months ago

Switch most tests to hooks.py instead of preconditions in test scripts

The new function mgstest.require_apache_modules() covers required
Apache modules, the rest is individual stuff.

  • Property mode set to 100644
File size: 450 bytes
Line 
1import os
2import re
3from mgstest import require_match
4from unittest import SkipTest
5
6def prepare_env():
7    if not 'OCSP_PORT' in os.environ:
8        raise SkipTest('OCSP_PORT is not set, check if openssl is available.')
9
10def post_check(conn_log, response_log):
11    print('Checking if the client actually got a stapled response:')
12    print(require_match(re.compile(r'^- Options: .*OCSP status request,'),
13                        conn_log).group(0))
Note: See TracBrowser for help on using the repository browser.