Commit 8b91aa3
committed
refactor: Update test imports to use new modular structure
Refactored all test files in tests/changelog/ to import directly from the new modular structure instead of relying on backward compatibility imports from changelog_helper.py.
**Import mapping:**
- DiffStix: changelog_helper → core.diff_stix
- AttackChangesEncoder: changelog_helper → core.attack_changes_encoder
- AttackObjectVersion, version utils: changelog_helper → utils.version_utils
- STIX utilities: changelog_helper → utils.stix_utils
- URL utilities: changelog_helper → utils.url_utils
- HTML/markdown formatters: changelog_helper → formatters.html_output
- Layer output: changelog_helper → formatters.layer_output
- CLI argument parser: changelog_helper → cli.argument_parser
**Files updated (17 total):**
Core tests:
- test_versioning.py - version_utils imports
- test_stix_processing.py - stix_utils + url_utils imports
- test_change_detection.py - stix_utils + version_utils imports
- test_diffstix_methods.py - core.diff_stix import
- test_missing_functions.py - multiple module imports
Integration tests:
- test_diffstix_behavioral.py - core.diff_stix import
- test_diffstix_minimal_data.py - core.diff_stix import
- test_diffstix_multi_domain.py - core.diff_stix import
- test_regression_baseline.py - core.attack_changes_encoder import
- test_network.py - core.diff_stix import
Formatting tests:
- test_html_output.py - formatters.html_output imports
- test_json_output.py - core.attack_changes_encoder + utils.version_utils imports
- test_layer_output.py - formatters.layer_output import
- test_markdown_output.py - formatters.html_output + utils.version_utils imports
Other:
- conftest.py - core.diff_stix import
- error_handling/test_errors.py - core.diff_stix + utils.version_utils imports
- cli/test_argument_handling.py - cli.argument_parser import
**Benefits:**
- Tests now use the actual module structure
- Clearer separation of concerns in test imports
- Removes dependency on backward compatibility layer
- Makes module responsibilities more explicit
- Easier to identify which module a function belongs to1 parent da3450d commit 8b91aa3
17 files changed
Lines changed: 26 additions & 38 deletions
File tree
- tests/changelog
- cli
- core
- error_handling
- formatting
- integration
- network
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 3 | + | |
| 4 | + | |
9 | 5 | | |
10 | 6 | | |
11 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 7 | + | |
| 8 | + | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
0 commit comments