def test_create_rp_service_init(mock_rps):
    create_rp_service(Config(endpoint="A", token="B", project="C"))
    mock_rps.assert_has_calls(
        [
            mock.call(
                endpoint="A",
                launch_id=None,
                token="B",
                project="C",
                is_skipped_an_issue=False,
                retries=None,
            )
        ],
        any_order=True,
    )
Пример #2
0
def before_all(context):
    cfg = read_config(context)
    context.rp_agent = BehaveAgent(cfg, create_rp_service(cfg))
    context.rp_agent.start_launch(context)
def test_create_rp_service_enabled_rp(config):
    rp = create_rp_service(config)
    assert isinstance(
        rp, ReportPortalService
    ), "Invalid initialization of RP ReportPortalService"
def test_create_rp_service_disabled_rp():
    assert (
        create_rp_service(Config()) is None
    ), "Service is not None for disabled integration with RP in config"