Changeset a2d1bb9 in mod_gnutls for test/https-test-client.py


Ignore:
Timestamp:
Dec 4, 2019, 10:14:50 AM (17 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
asyncio, master, proxy-ticket
Children:
6d3dc34
Parents:
ec63b07
Message:

https-test-client.py: Support multiple connections in one test config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/https-test-client.py

    rec63b07 ra2d1bb9  
    383383    args = parser.parse_args()
    384384
    385     test_conn = None
     385    conns = None
    386386
    387387    config = yaml.load(args.test_config, Loader=yaml.Loader)
    388388    if type(config) is TestConnection:
    389         test_conn = config
    390         print(test_conn)
     389        conns = [config]
     390    elif type(config) is list:
     391        # assume list elements are connections
     392        conns = config
    391393    else:
    392394        raise TypeError(f'Unsupported configuration: {config!r}')
    393 
    394     test_conn.run(host=args.host, port=args.port)
     395    print(conns)
     396
     397    for test_conn in conns:
     398        test_conn.run(host=args.host, port=args.port)
Note: See TracChangeset for help on using the changeset viewer.