Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/invenio-resourcesyncserver/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def base_app(instance_path, request):
'src_pdf': 'by-nc-nd.png',
'href_pdf': 'http://creativecommons.org/licenses/by-nc-nd/4.0/',
'txt': 'This work is licensed under a Creative Commons Attribution'
'-NonCommercial-ShareAlike 4.0 International License.'
'-NonCommercial-NoDerivatives 4.0 International License.'
},
],
WEKO_RECORDS_UI_BULK_UPDATE_FIELDS=WEKO_RECORDS_UI_BULK_UPDATE_FIELDS,
Expand Down Expand Up @@ -1108,4 +1108,4 @@ def sample_file():
"data",
"sample_file",
"sample_file.txt",
)
)
2 changes: 1 addition & 1 deletion modules/weko-index-tree/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def base_app(instance_path):
'src_pdf': 'by-nc-nd.png',
'href_pdf': 'http://creativecommons.org/licenses/by-nc-nd/4.0/',
'txt': 'This work is licensed under a Creative Commons Attribution'
'-NonCommercial-ShareAlike 4.0 International License.'
'-NonCommercial-NoDerivatives 4.0 International License.'
},
],
WEKO_ITEMS_UI_OUTPUT_REGISTRATION_TITLE="",
Expand Down
6 changes: 3 additions & 3 deletions modules/weko-items-ui/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7717,7 +7717,7 @@ def test_make_stats_file(app, db, users, db_itemtype, db_records, db_itemtype2,
"src_pdf": "by-nc-nd.png",
"href_pdf": "http://creativecommons.org/licenses/by-nc-nd/4.0/",
"txt": "This work is licensed under a Creative Commons Attribution"
"-NonCommercial-ShareAlike 4.0 International License.",
"-NonCommercial-NoDerivatives 4.0 International License.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · License wording is not tested

When the application’s default BY-NC-ND text is still the BY-NC-SA wording, test_make_stats_file, test_make_stats_file_issue33432, and test_make_stats_file_issue36234 set this text in their own app config, then assert make_stats_file results. The function does not read this config key, so those assertions still pass if the application’s actual default wording is wrong.

Add an assertion that checks the application’s configured BY-NC-ND text rather than only assigning it in test setup.

Also at modules/weko-items-ui/tests/test_utils.py:8112, modules/weko-items-ui/tests/test_utils.py:8311.

Prompt for AI agents
In `modules/weko-items-ui/tests/test_utils.py` at line 7720:

**License wording is not tested**

When the application’s default BY-NC-ND text is still the BY-NC-SA wording, `test_make_stats_file`, `test_make_stats_file_issue33432`, and `test_make_stats_file_issue36234` set this text in their own app config, then assert `make_stats_file` results. The function does not read this config key, so those assertions still pass if the application’s actual default wording is wrong.

Add an assertion that checks the application’s configured BY-NC-ND text rather than only assigning it in test setup.

Also at `modules/weko-items-ui/tests/test_utils.py:8112`, `modules/weko-items-ui/tests/test_utils.py:8311`.

},
],
)
Expand Down Expand Up @@ -8109,7 +8109,7 @@ def test_make_stats_file_issue33432(app, users,db_itemtype, db_records,db_itemty
"src_pdf": "by-nc-nd.png",
"href_pdf": "http://creativecommons.org/licenses/by-nc-nd/4.0/",
"txt": "This work is licensed under a Creative Commons Attribution"
"-NonCommercial-ShareAlike 4.0 International License.",
"-NonCommercial-NoDerivatives 4.0 International License.",
},
],
)
Expand Down Expand Up @@ -8307,7 +8307,7 @@ def test_make_stats_file_issue36234(app, users,db_itemtype,db_records_file):
"src_pdf": "by-nc-nd.png",
"href_pdf": "http://creativecommons.org/licenses/by-nc-nd/4.0/",
"txt": "This work is licensed under a Creative Commons Attribution"
"-NonCommercial-ShareAlike 4.0 International License.",
"-NonCommercial-NoDerivatives 4.0 International License.",
},
],
)
Expand Down
2 changes: 1 addition & 1 deletion modules/weko-records-ui/weko_records_ui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@
'src_pdf': 'by-nc-nd.png',
'href_pdf': 'http://creativecommons.org/licenses/by-nc-nd/4.0/',
'txt': 'This work is licensed under a Creative Commons Attribution'
'-NonCommercial-ShareAlike 4.0 International License.'
'-NonCommercial-NoDerivatives 4.0 International License.'
},
]
"""Define of list license will be used."""
Expand Down
2 changes: 1 addition & 1 deletion modules/weko-search-ui/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ def base_app(instance_path, search_class, request):
"src_pdf": "by-nc-nd.png",
"href_pdf": "http://creativecommons.org/licenses/by-nc-nd/4.0/",
"txt": "This work is licensed under a Creative Commons Attribution"
"-NonCommercial-ShareAlike 4.0 International License.",
"-NonCommercial-NoDerivatives 4.0 International License.",
},
],
WEKO_RECORDS_UI_BULK_UPDATE_FIELDS=WEKO_RECORDS_UI_BULK_UPDATE_FIELDS,
Expand Down
2 changes: 1 addition & 1 deletion modules/weko-theme/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def base_app(instance_path):
'src_pdf': 'by-nc-nd.png',
'href_pdf': 'http://creativecommons.org/licenses/by-nc-nd/4.0/',
'txt': 'This work is licensed under a Creative Commons Attribution'
'-NonCommercial-ShareAlike 4.0 International License.'
'-NonCommercial-NoDerivatives 4.0 International License.'
},
],
WEKO_THEME_DEFAULT_COMMUNITY = 'Root Index',
Expand Down
2 changes: 1 addition & 1 deletion modules/weko-workflow/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def base_app(instance_path, search_class, cache_config):
'src_pdf': 'by-nc-nd.png',
'href_pdf': 'http://creativecommons.org/licenses/by-nc-nd/4.0/',
'txt': 'This work is licensed under a Creative Commons Attribution'
'-NonCommercial-ShareAlike 4.0 International License.'
'-NonCommercial-NoDerivatives 4.0 International License.'
},
],
WEKO_ITEMS_UI_MS_MIME_TYPE = {
Expand Down
2 changes: 1 addition & 1 deletion modules/weko-workspace/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def base_app(instance_path, search_class, cache_config):
'src_pdf': 'by-nc-nd.png',
'href_pdf': 'http://creativecommons.org/licenses/by-nc-nd/4.0/',
'txt': 'This work is licensed under a Creative Commons Attribution'
'-NonCommercial-ShareAlike 4.0 International License.'
'-NonCommercial-NoDerivatives 4.0 International License.'
},
],
WEKO_ITEMS_UI_MS_MIME_TYPE = {
Expand Down
2 changes: 1 addition & 1 deletion scripts/instance.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ WEKO_RECORDS_UI_LICENSE_DICT = [
'src_pdf': 'by-nc-nd.png',
'href_pdf': 'http://creativecommons.org/licenses/by-nc-nd/4.0/',
'txt': 'This work is licensed under a Creative Commons Attribution'
'-NonCommercial-ShareAlike 4.0 International License.'
'-NonCommercial-NoDerivatives 4.0 International License.'
},
]

Expand Down
2 changes: 1 addition & 1 deletion test/tavern/helper/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,6 @@
'src_pdf': 'by-nc-nd.png',
'href_pdf': 'http://creativecommons.org/licenses/by-nc-nd/4.0/',
'txt': 'This work is licensed under a Creative Commons Attribution'
'-NonCommercial-ShareAlike 4.0 International License.'
'-NonCommercial-NoDerivatives 4.0 International License.'
},
]