-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
Most tests only assert status_code == 200 and that expected keys exist in the response. They do not verify the actual values returned. For example:
test_compare_configsdoesn't assert thathas_changesisTrue.test_search_configdoesn't assert that the matches actually contain the expected interface lines or thatmatch_count > 0.test_parse_configdoesn't assert anything about the structure ofstructured_config.
These tests would pass even if the services returned incorrect data.
Suggested Fix
Add value assertions to each test. For example:
def test_compare_configs(...):
...
assert data["has_changes"] is True
assert "hostname" in data["unified_diff"]
def test_search_config(...):
...
assert data["match_count"] == 2
assert any("GigabitEthernet0/0" in m for m in data["matches"])Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working