()
| 104 | |
| 105 | |
| 106 | def test_fingerprint(): |
| 107 | for resource in valid_resources: |
| 108 | # The fingerprint matches expectations |
| 109 | fingerprint = build_fingerprint( |
| 110 | resource.get("path"), |
| 111 | resource.get("version", version), |
| 112 | resource.get("hash", hash_value), |
| 113 | ) |
| 114 | assert fingerprint == resource.get("fingerprint") |
| 115 | |
| 116 | (original_path, has_fingerprint) = check_fingerprint(fingerprint) |
| 117 | # The inverse operation returns that the fingerprint was valid |
| 118 | # and the original path |
| 119 | assert has_fingerprint |
| 120 | assert original_path == resource.get("path") |
| 121 | |
| 122 | for resource in valid_fingerprints: |
| 123 | (_, has_fingerprint) = check_fingerprint(resource) |
| 124 | assert has_fingerprint, resource |
| 125 | |
| 126 | for resource in invalid_fingerprints: |
| 127 | (_, has_fingerprint) = check_fingerprint(resource) |
| 128 | assert not has_fingerprint, resource |
nothing calls this directly
no test coverage detected
searching dependent graphs…