Skip to content

Add SSL support for `HttpServiceMock`

Compare
Choose a tag to compare
@fwkz fwkz released this 03 Dec 14:19
· 20 commits to master since this release
4ca063e

Adhoc SSL support

You can serve HttpScenarioService using adhoc SSL certificate by setting
ssl keyword argument to True:

from threat9_test_bed.service_mocks import HttpScenarioService

@pytest.fixture(scope="session")
def trash_target():
    with HttpScenarioService("127.0.0.1", 8443, HttpScenario.TRASH, 
                             ssl=True) as http_service:
        yield http_service