feat(exercises): bump version to 0.8.65 and enhance club media copyright handling
Deploy Development / deploy (push) Successful in 36s
Test Suite / pytest-backend (push) Successful in 30s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 8s
Test Suite / playwright-tests (push) Successful in 25s
Test Suite / pytest-backend (pull_request) Successful in 23s
Test Suite / lint-backend (pull_request) Successful in 0s
Test Suite / build-frontend (pull_request) Successful in 6s
Test Suite / playwright-tests (pull_request) Successful in 23s
Deploy Development / deploy (push) Successful in 36s
Test Suite / pytest-backend (push) Successful in 30s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 8s
Test Suite / playwright-tests (push) Successful in 25s
Test Suite / pytest-backend (pull_request) Successful in 23s
Test Suite / lint-backend (pull_request) Successful in 0s
Test Suite / build-frontend (pull_request) Successful in 6s
Test Suite / playwright-tests (pull_request) Successful in 23s
- Incremented application version to 0.8.65 and updated changelog with new features. - Added support for setting default copyright notices for club exercises, allowing users to apply a common copyright notice to linked media assets. - Enhanced error handling to prompt users for copyright information when required. - Updated tests to verify the new copyright handling functionality.
This commit is contained in:
1 parent
a7cecca36f
commit
59fb8a5527
4 files changed
+157
-9
No files matched your search
@@ -60,3 +60,49 @@ def test_apply_club_exercise_media_copyright_ok() -> None:
|
||||
apply_club_exercise_media_copyright_rules(object(), 42, "club")
|
||||
finally:
|
||||
exercises_mod._fetch_exercise_linked_file_assets = orig
|
||||
|
||||
|
||||
def test_apply_club_exercise_media_copyright_applies_default() -> None:
|
||||
"""Nach Bestätigung setzt der Client default_club_media_copyright — Backend schreibt auf Assets."""
|
||||
orig_fetch = exercises_mod._fetch_exercise_linked_file_assets
|
||||
calls = {"n": 0}
|
||||
|
||||
def mock_fetch(_cur, _eid: int):
|
||||
calls["n"] += 1
|
||||
if calls["n"] == 1:
|
||||
return [
|
||||
{
|
||||
"id": 10,
|
||||
"visibility": "private",
|
||||
"club_id": 1,
|
||||
"lifecycle_state": "active",
|
||||
"copyright_notice": "",
|
||||
"original_filename": "x.jpg",
|
||||
}
|
||||
]
|
||||
return [
|
||||
{
|
||||
"id": 10,
|
||||
"visibility": "private",
|
||||
"club_id": 1,
|
||||
"lifecycle_state": "active",
|
||||
"copyright_notice": "© Testverein",
|
||||
"original_filename": "x.jpg",
|
||||
}
|
||||
]
|
||||
|
||||
class MockCur:
|
||||
def execute(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
exercises_mod._fetch_exercise_linked_file_assets = mock_fetch
|
||||
try:
|
||||
apply_club_exercise_media_copyright_rules(
|
||||
MockCur(),
|
||||
42,
|
||||
"club",
|
||||
default_club_media_copyright="© Testverein",
|
||||
)
|
||||
assert calls["n"] == 2
|
||||
finally:
|
||||
exercises_mod._fetch_exercise_linked_file_assets = orig_fetch
|
||||
Reference in new issue
Block a user