|
109 | 109 | "validate_json_file", |
110 | 110 | "validate_layer_file", |
111 | 111 | # CLI argument testing helper fixtures |
112 | | - "create_mock_args", |
113 | 112 | "setup_monkeypatch_args", |
114 | 113 | ] |
115 | 114 |
|
@@ -1939,57 +1938,9 @@ def validate_layer_file(): |
1939 | 1938 | # ======================================== |
1940 | 1939 |
|
1941 | 1940 |
|
1942 | | -@pytest.fixture |
1943 | | -def create_mock_args(): |
1944 | | - """Create mock CLI argument objects with configurable parameters.""" |
1945 | | - |
1946 | | - def _create_mock_args(**overrides): |
1947 | | - """Create a mock args object with default values, allowing selective overrides. |
1948 | | -
|
1949 | | - Parameters |
1950 | | - ---------- |
1951 | | - **overrides : dict |
1952 | | - Dictionary of argument names to override with custom values |
1953 | | -
|
1954 | | - Returns |
1955 | | - ------- |
1956 | | - Mock |
1957 | | - Mock object with all CLI arguments as attributes |
1958 | | - """ |
1959 | | - # Default argument values matching the CLI parser defaults |
1960 | | - defaults = { |
1961 | | - "domains": ["enterprise-attack", "mobile-attack", "ics-attack"], |
1962 | | - "layers": None, |
1963 | | - "unchanged": False, |
1964 | | - "old": "old", |
1965 | | - "new": "new", |
1966 | | - "show_key": False, |
1967 | | - "site_prefix": "", |
1968 | | - "use_mitre_cti": False, |
1969 | | - "verbose": False, |
1970 | | - "contributors": True, |
1971 | | - "markdown_file": None, |
1972 | | - "html_file": None, |
1973 | | - "html_file_detailed": None, |
1974 | | - "json_file": None, |
1975 | | - } |
1976 | | - |
1977 | | - # Apply any overrides |
1978 | | - defaults.update(overrides) |
1979 | | - |
1980 | | - # Create mock object with all attributes |
1981 | | - mock_args = Mock() |
1982 | | - for key, value in defaults.items(): |
1983 | | - setattr(mock_args, key, value) |
1984 | | - |
1985 | | - return mock_args |
1986 | | - |
1987 | | - return _create_mock_args |
1988 | | - |
1989 | | - |
1990 | 1941 | @pytest.fixture |
1991 | 1942 | def setup_monkeypatch_args(): |
1992 | | - """Helper to set up monkeypatch for CLI argument testing.""" |
| 1943 | + """Set up monkeypatch for CLI argument testing.""" |
1993 | 1944 |
|
1994 | 1945 | def _setup_args(argv_list, monkeypatch): |
1995 | 1946 | """Set up sys.argv with monkeypatch for argument parsing tests.""" |
|
0 commit comments