Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #57: Reverse columns in diff #59

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion netbox_config_diff/compliance/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_compliance_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading