예제 #1
0
def test_ScanOverrides_parse_assigned_hosts_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_assigned_hosts_overrides()

    # Expect
    assert scan_overrides_object.allowed_hosts == []  # nothing passed
예제 #2
0
def test_ScanOverrides_parse_assigned_hosts_overrides_with_allowed_hosts_success(
        get_endpoint_mock, parse_webinspect_mock, run_env_mock):
    # Given
    overrides = _setup_overrides(expected_allowed_hosts=["some.site.com"])

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

    # Expect
    assert scan_overrides_object.allowed_hosts == ["some.site.com"]