- Extends GET /api/v1/tags with sort=count_desc and min_count query params - New TagsComponent at /tags (public, no auth guard) shows all tags sorted by image count - Clicking a tag navigates to /?tags=<name> for a pre-filtered library view - LibraryComponent reads ?tags= query param on init to support deep-linking from tag browser - Library header gains a "Browse tags" link to /tags for discoverability - All 15 TDD tasks complete; ruff, ng lint, and ng build clean Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
512 B
Python
22 lines
512 B
Python
import hashlib
|
|
|
|
from app.utils import compute_sha256
|
|
|
|
|
|
def test_sha256_known_bytes():
|
|
data = b"hello world"
|
|
expected = hashlib.sha256(data).hexdigest()
|
|
assert compute_sha256(data) == expected
|
|
|
|
|
|
def test_sha256_empty_bytes():
|
|
data = b""
|
|
expected = hashlib.sha256(data).hexdigest()
|
|
assert compute_sha256(data) == expected
|
|
|
|
|
|
def test_sha256_returns_64_char_hex():
|
|
result = compute_sha256(b"test data")
|
|
assert len(result) == 64
|
|
assert all(c in "0123456789abcdef" for c in result)
|