def test_ScanOverrides_parse_login_macro_overrides_success(get_endpoint_mock, parse_webinspect_mock, run_env_mock):
    # Given
    overrides = _setup_overrides()

    # When
    scan_overrides_object = ScanOverrides(overrides)
    scan_overrides_object._parse_login_macro_overrides()

    # Expect
    assert scan_overrides_object.login_macro is None
Example #2
0
def test_ScanOverrides_parse_login_macro_overrides_cli_passed_loging_macro_success(
        get_endpoint_mock, parse_webinspect_mock, run_env_mock):
    # Given
    overrides = _setup_overrides(expected_login_macro="macro.xml")

    # When
    scan_overrides_object = ScanOverrides(overrides)
    scan_overrides_object._parse_login_macro_overrides()

    # Expect
    assert scan_overrides_object.login_macro is "macro.xml"
    assert scan_overrides_object.webinspect_upload_webmacros == ["macro.xml"]