Changeset 905063e in mod_gnutls


Ignore:
Timestamp:
Jan 3, 2020, 5:08:56 AM (11 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
master, proxy-ticket
Children:
f246f00
Parents:
0f65ea9
Message:

Simplify 16_view-status post_check hook using mgstest.require_match()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/tests/16_view-status/hooks.py

    r0f65ea9 r905063e  
    1 from mgstest import first_line_match, TestExpectationFailed
     1from mgstest import require_match, TestExpectationFailed
    22import re
    33
     
    1616    re_status = re.compile('(?<=^Current TLS session:\s)' + re_session + '$')
    1717
    18     cli_suite = first_line_match(re_cli, conn_log)
    19     if not cli_suite:
    20         raise TestExpectationFailed(
    21             'Client cipher suite information is missing!')
    22     status_suite = first_line_match(re_status, response_log)
    23     if not status_suite:
    24         raise TestExpectationFailed(
    25             'Server cipher suite information is missing!')
     18    cli_suite = require_match(re_cli, conn_log,
     19                              'Client cipher suite information is missing!')
     20    status_suite = require_match(re_status, response_log,
     21                                 'Server cipher suite information is missing!')
    2622
    2723    print(f'Client session info: {cli_suite.group(0)}')
Note: See TracChangeset for help on using the changeset viewer.