diff --git a/netbox_config_diff/compliance/utils.py b/netbox_config_diff/compliance/utils.py index c0aa4af..1da8fc7 100644 --- a/netbox_config_diff/compliance/utils.py +++ b/netbox_config_diff/compliance/utils.py @@ -30,8 +30,8 @@ def __init__(self, choices, *args, **kwargs): def get_unified_diff(rendered_config: str, actual_config: str, device: str) -> str: diff = unified_diff( - rendered_config.strip().splitlines(), actual_config.splitlines(), + rendered_config.strip().splitlines(), fromfiledate=device, tofiledate=device, lineterm="", diff --git a/tests/test_compliance_utils.py b/tests/test_compliance_utils.py index 4178a26..b69b285 100644 --- a/tests/test_compliance_utils.py +++ b/tests/test_compliance_utils.py @@ -56,4 +56,4 @@ def test_exclude_lines(regex: str, expected: str) -> None: ids=["diff", "no diff"], ) def test_get_unified_diff(render: str, actual: str, expected: str) -> None: - assert get_unified_diff(render, actual, "test-1") == expected + assert get_unified_diff(actual, render, "test-1") == expected