fix: remove duplicate IANA registry entry causing false update reports
This commit is contained in:
BIN
compliance_status.db
Normal file
BIN
compliance_status.db
Normal file
Binary file not shown.
@@ -529,9 +529,9 @@ poetry run pytest tests/ -v
|
||||
- `tests/test_cli.py`: 3 CLI parsing tests
|
||||
- `tests/test_iana_validator.py`: 20 IANA validation tests
|
||||
- `tests/test_iana_parse.py`: 14 IANA parsing tests
|
||||
- `tests/test_iana_update.py`: 13 IANA update tests
|
||||
- `tests/test_iana_update.py`: 14 IANA update tests
|
||||
|
||||
**Total:** 63 tests
|
||||
**Total:** 64 tests
|
||||
|
||||
**Test database setup:**
|
||||
|
||||
|
||||
@@ -24,11 +24,6 @@
|
||||
"tls-parameters-5",
|
||||
"tls_content_types.csv",
|
||||
["Value", "Description", "DTLS", "Recommended", "RFC/Draft"]
|
||||
],
|
||||
[
|
||||
"tls-parameters-7",
|
||||
"tls_content_types.csv",
|
||||
["Value", "Description", "DTLS", "Recommended", "RFC/Draft"]
|
||||
]
|
||||
],
|
||||
"https://www.iana.org/assignments/ikev2-parameters/ikev2-parameters.xml": [
|
||||
|
||||
@@ -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