fix: remove duplicate IANA registry entry causing false update reports
This commit is contained in:
@@ -283,3 +283,42 @@ class TestDiffCalculationEdgeCases:
|
||||
assert "0x03" in diff["added"]
|
||||
assert "0x02" in diff["deleted"]
|
||||
assert "0x01" in diff["modified"]
|
||||
|
||||
|
||||
class TestConsecutiveUpdates:
|
||||
"""Tests for consecutive IANA updates."""
|
||||
|
||||
def test_consecutive_updates_show_no_changes(self, test_db_path: str) -> None:
|
||||
"""Test that second update with same data shows no changes."""
|
||||
xml_path = "tests/fixtures/iana_xml/tls-parameters-minimal.xml"
|
||||
|
||||
with open(xml_path, encoding="utf-8") as f:
|
||||
xml_content = f.read()
|
||||
|
||||
conn = sqlite3.connect(test_db_path)
|
||||
headers = ["Value", "Description", "DTLS", "Recommended", "RFC/Draft"]
|
||||
|
||||
row_count_1, diff_1 = process_registry_with_validation(
|
||||
xml_content,
|
||||
"tls-parameters-4",
|
||||
"iana_tls_cipher_suites",
|
||||
headers,
|
||||
conn,
|
||||
skip_min_rows_check=True,
|
||||
)
|
||||
|
||||
row_count_2, diff_2 = process_registry_with_validation(
|
||||
xml_content,
|
||||
"tls-parameters-4",
|
||||
"iana_tls_cipher_suites",
|
||||
headers,
|
||||
conn,
|
||||
skip_min_rows_check=True,
|
||||
)
|
||||
|
||||
assert row_count_1 == row_count_2
|
||||
assert len(diff_2["added"]) == 0
|
||||
assert len(diff_2["deleted"]) == 0
|
||||
assert len(diff_2["modified"]) == 0
|
||||
|
||||
conn.close()
|
||||
|
||||
Reference in New Issue
Block a user