Skip to content

Releases: threat9/threat9-test-bed

HttpScenarioService

03 Nov 17:32
Compare
Choose a tag to compare

HttpScenarioService

HttpScenarioService allows for creating test utilities using pre-defined scenarios.

import pytest

from threat9_test_bed.scenarios import HttpScenario
from threat9_test_bed.service_mocks import HttpScenarioService


@pytest.fixture(scope="session")
def empty_target():
    with HttpScenarioService("127.0.0.1", 8081,
                             HttpScenario.EMPTY_RESPONSE) as http_service:
        yield http_service


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

Initial release

19 Sep 16:39
Compare
Choose a tag to compare

Supported services

  • http
  • https

Test utilites

  • HttpServiceMock