Skip to content

Commit

Permalink
Reverse columns in diff (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
miaow2 authored Apr 9, 2024
1 parent a757ac7 commit cd091be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit cd091be

Please sign in to comment.