Реализованы задачи бэклога 1-5 (1я не до конца)
This commit is contained in:
@@ -68,7 +68,7 @@ def test_trace_id_uses_valid_w3c_header_and_generates_fallback() -> None:
|
||||
int(fallback, 16)
|
||||
|
||||
|
||||
def test_user_agent_and_device_are_hashed_without_raw_identifiers() -> None:
|
||||
def test_user_agent_is_hashed_and_device_parameters_are_preserved() -> None:
|
||||
agent = "Example Browser/1.0"
|
||||
assert user_agent_hash(request(user_agent=agent)) == hashlib.sha256(agent.encode()).hexdigest()
|
||||
snapshot = device_snapshot(
|
||||
@@ -77,9 +77,8 @@ def test_user_agent_and_device_are_hashed_without_raw_identifiers() -> None:
|
||||
assert snapshot == {
|
||||
"platform": "web",
|
||||
"app_version": "1.2.3",
|
||||
"device_id_hash": hashlib.sha256(b"raw-device-id").hexdigest(),
|
||||
"device_id": "raw-device-id",
|
||||
}
|
||||
assert "raw-device-id" not in str(snapshot)
|
||||
|
||||
|
||||
def test_audit_copies_request_context_and_bounded_metadata() -> None:
|
||||
|
||||
Reference in New Issue
Block a user