File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,10 +31,10 @@ def test_compute_hardware_id_consistency():
3131 assert id1 == id2
3232
3333def test_validate_fingerprint_data_no_data ():
34- """Verify handling of missing fingerprint data (legacy reduced) ."""
34+ """Missing fingerprint payload must fail validation ."""
3535 passed , reason = validate_fingerprint_data (None )
36- assert passed is True
37- assert reason == "no_fingerprint_data_legacy_reduced "
36+ assert passed is False
37+ assert reason == "missing_fingerprint_data "
3838
3939def test_validate_fingerprint_data_vm_detection ():
4040 """Verify detection of VM indicators."""
@@ -78,6 +78,20 @@ def test_validate_fingerprint_data_clock_drift_threshold():
7878 assert passed is False
7979 assert reason == "timing_too_uniform"
8080
81+ def test_validate_fingerprint_data_clock_drift_insufficient_samples ():
82+ """Clock drift cannot pass with extremely low sample count."""
83+ fingerprint = {
84+ "checks" : {
85+ "clock_drift" : {
86+ "passed" : True ,
87+ "data" : {"cv" : 0.02 , "samples" : 1 }
88+ }
89+ }
90+ }
91+ passed , reason = validate_fingerprint_data (fingerprint )
92+ assert passed is False
93+ assert reason .startswith ("clock_drift_insufficient_samples" )
94+
8195def test_validate_fingerprint_data_vintage_stability ():
8296 """Verify rejection of suspicious stability on vintage hardware."""
8397 claimed_device = {"device_arch" : "G4" }
You can’t perform that action at this time.
0 commit comments