invenio-app-rdm 13.0.0b3.dev15__py2.py3-none-any.whl → 13.0.0b3.dev17__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. invenio_app_rdm/__init__.py +1 -1
  2. invenio_app_rdm/administration/audit_logs/audit_logs.py +22 -18
  3. invenio_app_rdm/communities_ui/sitemap.py +63 -0
  4. invenio_app_rdm/communities_ui/views/communities.py +9 -8
  5. invenio_app_rdm/communities_ui/views/ui.py +1 -1
  6. invenio_app_rdm/config.py +14 -0
  7. invenio_app_rdm/records_ui/sitemap.py +44 -0
  8. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/AuditLogActions.js +136 -0
  9. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewJson.js +35 -0
  10. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewRecentChanges.js +119 -0
  11. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/index.js +2 -0
  12. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/search/SearchResultItemLayout.js +34 -18
  13. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/RevisionsDiffViewer.js +1 -1
  14. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/api.js +5 -0
  15. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/routes.js +7 -1
  16. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/package.json +2 -1
  17. invenio_app_rdm/theme/{static → templates/semantic-ui/invenio_app_rdm}/robots.txt +4 -0
  18. invenio_app_rdm/theme/views.py +6 -2
  19. invenio_app_rdm/theme/webpack.py +1 -0
  20. {invenio_app_rdm-13.0.0b3.dev15.dist-info → invenio_app_rdm-13.0.0b3.dev17.dist-info}/METADATA +13 -2
  21. {invenio_app_rdm-13.0.0b3.dev15.dist-info → invenio_app_rdm-13.0.0b3.dev17.dist-info}/RECORD +29 -24
  22. {invenio_app_rdm-13.0.0b3.dev15.dist-info → invenio_app_rdm-13.0.0b3.dev17.dist-info}/WHEEL +1 -1
  23. tests/conftest.py +126 -8
  24. tests/ui/conftest.py +6 -8
  25. tests/ui/test_robotstxt.py +35 -0
  26. tests/ui/test_sitemaps.py +85 -0
  27. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewAction.js +0 -0
  28. tests/ui/test_static.py +0 -25
  29. {invenio_app_rdm-13.0.0b3.dev15.dist-info → invenio_app_rdm-13.0.0b3.dev17.dist-info}/entry_points.txt +0 -0
  30. {invenio_app_rdm-13.0.0b3.dev15.dist-info → invenio_app_rdm-13.0.0b3.dev17.dist-info}/licenses/LICENSE +0 -0
  31. {invenio_app_rdm-13.0.0b3.dev15.dist-info → invenio_app_rdm-13.0.0b3.dev17.dist-info}/top_level.txt +0 -0
@@ -74,7 +74,7 @@ export class RevisionsDiffViewer extends Component {
74
74
 
75
75
  RevisionsDiffViewer.propTypes = {
76
76
  diff: PropTypes.object,
77
- viewerProps: PropTypes.object.isRequired,
77
+ viewerProps: PropTypes.object,
78
78
  };
79
79
 
80
80
  RevisionsDiffViewer.defaultProps = {
@@ -26,8 +26,13 @@ const getRevisions = async (record) => {
26
26
  return await http.get(APIRoutes.compare(record));
27
27
  };
28
28
 
29
+ const getLastRevision = async (record, revisionId, includePrevious) => {
30
+ return await http.get(APIRoutes.lastRevision(record, revisionId, includePrevious));
31
+ };
32
+
29
33
  export const RecordModerationApi = {
30
34
  deleteRecord: deleteRecord,
31
35
  restoreRecord: restoreRecord,
32
36
  getRevisions: getRevisions,
37
+ getLastRevision: getLastRevision,
33
38
  };
@@ -6,6 +6,7 @@
6
6
  * under the terms of the MIT License; see LICENSE file for more details.
7
7
  */
8
8
 
9
+ import { last } from "lodash";
9
10
  import _get from "lodash/get";
10
11
 
11
12
  const APIRoutesGenerators = {
@@ -15,10 +16,15 @@ const APIRoutesGenerators = {
15
16
  compare: (record, idKeyPath = "id") => {
16
17
  return `/api/records/${_get(record, idKeyPath)}/revisions`;
17
18
  },
18
-
19
19
  restore: (record, idKeyPath = "id") => {
20
20
  return `/api/records/${_get(record, idKeyPath)}/restore`;
21
21
  },
22
+ lastRevision: (record, revisionId, includePrevious = false, idKeyPath = "id") => {
23
+ return `/api/records/${_get(
24
+ record,
25
+ idKeyPath
26
+ )}/revisions/${revisionId}?include_previous=${includePrevious}`;
27
+ },
22
28
  };
23
29
  export const APIRoutes = {
24
30
  ...APIRoutesGenerators,
@@ -40,7 +40,8 @@
40
40
  "devDependencies": {
41
41
  "i18next-conv": "^10.2.0",
42
42
  "i18next-scanner": "^3.0.0",
43
- "react-i18next": "^11.11.3"
43
+ "react-i18next": "^11.11.3",
44
+ "react-json-view": "^1.21.3"
44
45
  },
45
46
  "scripts": {
46
47
  "extract_messages": "i18next-scanner --config i18next-scanner.config.js '../../js/**/*.{js,jsx}'",
@@ -9,3 +9,7 @@ Disallow: /login
9
9
  Disallow: /logout
10
10
  Disallow: /records/*/preview
11
11
  Crawl-delay: 10
12
+
13
+ {%- for url_of_sitemap_index in urls_of_sitemap_indices %}
14
+ Sitemap: {{ url_of_sitemap_index }}
15
+ {%- endfor %}
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  # Copyright (C) 2019-2024 CERN.
4
- # Copyright (C) 2019-2020 Northwestern University.
4
+ # Copyright (C) 2019-2025 Northwestern University.
5
5
  # Copyright (C) 2021 TU Wien.
6
6
  # Copyright (C) 2023-2024 Graz University of Technology.
7
7
  # Copyright (C) 2024 KTH Royal Institute of Technology.
@@ -17,6 +17,7 @@ from invenio_db import db
17
17
  from invenio_i18n import get_locale
18
18
  from invenio_i18n import lazy_gettext as _
19
19
  from invenio_pages.views import create_page_view
20
+ from invenio_sitemap import iterate_urls_of_sitemap_indices
20
21
  from invenio_users_resources.forms import NotificationsForm
21
22
 
22
23
  from invenio_app_rdm.views import create_url_rule
@@ -67,7 +68,10 @@ def index():
67
68
 
68
69
  def robots():
69
70
  """Robots.txt."""
70
- return current_app.send_static_file("robots.txt")
71
+ return render_template(
72
+ "invenio_app_rdm/robots.txt",
73
+ urls_of_sitemap_indices=iterate_urls_of_sitemap_indices(),
74
+ )
71
75
 
72
76
 
73
77
  def help_search():
@@ -60,6 +60,7 @@ theme = WebpackThemeBundle(
60
60
  "react-searchkit": "^3.0.0",
61
61
  "yup": "^0.32.0",
62
62
  "json-diff-kit": "^1.0.30",
63
+ "react-json-view": "^1.21.3",
63
64
  },
64
65
  aliases={
65
66
  # Define Semantic-UI theme configuration needed by
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: invenio-app-rdm
3
- Version: 13.0.0b3.dev15
3
+ Version: 13.0.0b3.dev17
4
4
  Summary: Invenio Research Data Management.
5
5
  Home-page: https://github.com/inveniosoftware/invenio-app-rdm
6
6
  Author: CERN
@@ -41,15 +41,17 @@ Requires-Dist: invenio-files-rest<4.0.0,>=3.0.0
41
41
  Requires-Dist: invenio-previewer<4.0.0,>=3.0.0
42
42
  Requires-Dist: invenio-records-files<2.0.0,>=1.2.1
43
43
  Requires-Dist: invenio-communities<19.0.0,>=18.2.0
44
- Requires-Dist: invenio-rdm-records<19.0.0,>=18.4.0
44
+ Requires-Dist: invenio-rdm-records<19.0.0,>=18.14.0
45
45
  Requires-Dist: CairoSVG<3.0.0,>=2.5.2
46
46
  Requires-Dist: invenio-banners<5.0.0,>=4.0.0
47
47
  Requires-Dist: invenio-pages<6.0.0,>=5.0.0
48
48
  Requires-Dist: invenio-audit-logs<1.0.0,>=0.1.0
49
+ Requires-Dist: invenio-sitemap<2.0.0,>=0.1.0
49
50
  Provides-Extra: tests
50
51
  Requires-Dist: pytest-black-ng>=0.4.0; extra == "tests"
51
52
  Requires-Dist: pytest-invenio<4.0.0,>=3.3.0; extra == "tests"
52
53
  Requires-Dist: Sphinx>=4.5.0; extra == "tests"
54
+ Requires-Dist: time-machine<3.0.0,>=2.12.0; extra == "tests"
53
55
  Provides-Extra: elasticsearch7
54
56
  Requires-Dist: invenio-search[elasticsearch7]<4.0.0,>=3.0.0; extra == "elasticsearch7"
55
57
  Provides-Extra: opensearch1
@@ -98,6 +100,15 @@ https://inveniordm.docs.cern.ch
98
100
  Changes
99
101
  =======
100
102
 
103
+ Version v13.0.0b3.dev17 (released 2025-06-02)
104
+
105
+ - Move collections implementaiton to Invenio-Collections
106
+ - Integrate Invenio-Sitemap
107
+
108
+ Version v13.0.0b3.dev16 (released 2025-05-23)
109
+
110
+ - administration: audit_logs: Add View Changes and View Log button and modals
111
+
101
112
  Version v13.0.0b3.dev15 (released 2025-05-23)
102
113
 
103
114
  - Revert "views: pass record object to record details"
@@ -1,12 +1,12 @@
1
- invenio_app_rdm/__init__.py,sha256=-4bZMGMbJLFF_c420PrGVnKhvjvGZJSM7LwoOQTqMlg,700
1
+ invenio_app_rdm/__init__.py,sha256=7C6arZ6LQC300Yd9eTbgAYajvqTJy6q2WjOfntU8RuA,700
2
2
  invenio_app_rdm/cli.py,sha256=G6QqNU2W6n6ICtTMnpeKFXIsdorncDmVXwwwsGH5F2k,2746
3
- invenio_app_rdm/config.py,sha256=xfA5wbNl9L1U-LZXdMCHz509LlvyHinPXAa_YPxDxQM,50880
3
+ invenio_app_rdm/config.py,sha256=F9VyDXDkiSXYtFkixtFUTw4x4AKaYs26HBSuJpJGDdU,51375
4
4
  invenio_app_rdm/ext.py,sha256=PkZhATGJDgYqBJQh41NdvBZWR83mgI3Eej6rj10UVJE,5278
5
5
  invenio_app_rdm/tasks.py,sha256=FyrIQXVuPjms-dNEnLrVmmdwrX_IykJ87gcSNgOR6O0,1373
6
6
  invenio_app_rdm/views.py,sha256=SDr9NwZEWQcgT_3GFRYdDf6eUaK9DfnoafIkhUf9nSI,785
7
7
  invenio_app_rdm/administration/__init__.py,sha256=8r9LeoE9fNHZSVS5QsCfVhRU7MAiEOWJk9MA3Y--4F8,251
8
8
  invenio_app_rdm/administration/audit_logs/__init__.py,sha256=jsBXeKSY5YNn1juF9sFyHPYo_XYpwdP3Dye-de7cMK0,318
9
- invenio_app_rdm/administration/audit_logs/audit_logs.py,sha256=vgrGQ1lLE5uSuoJCx9kIMQPshjxJzZlCZ4v5cZEcKus,2156
9
+ invenio_app_rdm/administration/audit_logs/audit_logs.py,sha256=6tZvqPKt54Hc8gL3Lz5LLwwKHABU3fWWhU5t0DHhgPk,2166
10
10
  invenio_app_rdm/administration/domains/__init__.py,sha256=Qob5kqjRPxpuSE5yDV2tesN6tmaKp5JcxCxGA8Mrcak,487
11
11
  invenio_app_rdm/administration/domains/domains.py,sha256=vafLa-mqkg_tQLjx328E64P_4mksB5kjBlsfunvdatg,5599
12
12
  invenio_app_rdm/administration/records/__init__.py,sha256=WpNHBm_Mk9FF8GzvrXWjL79URMSgBhpqgxvrLXNooqg,434
@@ -26,13 +26,14 @@ invenio_app_rdm/administration/views/__init__.py,sha256=2z29bPLUgK4jR_ztgNk4LunT
26
26
  invenio_app_rdm/administration/views/ui.py,sha256=IInmlFgWv6mUfKTHEUfe_czwY6u01j4SYyGMDS2hBsI,543
27
27
  invenio_app_rdm/communities_ui/__init__.py,sha256=7hAwfcQHeSbqIYHyuHqLhJgYXg6NxId4U9NueCQR3uo,325
28
28
  invenio_app_rdm/communities_ui/searchapp.py,sha256=0V_3WNBSf7di1Ml4O4FqlWZ0J9MBLN4F9AtBxF5cQcI,862
29
+ invenio_app_rdm/communities_ui/sitemap.py,sha256=Q7IeUUwd_yi9A7-Q2gcI52vxyN87nVWwDoIbwO-hpTs,2348
29
30
  invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/collection.html,sha256=h4OsqTvZ_qOfa99FKcMf2dH3lQ0VfESVpu7u8A-HHW8,2030
30
31
  invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/macros.html,sha256=a7sVjrW99c_dbGcxc6miSYq8aKvENqXRUgjb6gxN-P4,1824
31
32
  invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/details/browse/index.html,sha256=3cp9pSf1ItKA-PHm2hnmc_x7pIryTFxpxk_yfrgFz3o,2125
32
33
  invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/records/index.html,sha256=5Ub4uyVsjjTHzbhNe8Y-AAZG5oI28wZs2jQXvSPofXw,700
33
34
  invenio_app_rdm/communities_ui/views/__init__.py,sha256=HsbOWjDobxXGx6WFlTn45JYr0V9yqjCpDXOR_i2wmtw,401
34
- invenio_app_rdm/communities_ui/views/communities.py,sha256=t7qDZ8CiEwT9lB9B9_nS7IJn3V80t1i-yN48CU9rAyc,6706
35
- invenio_app_rdm/communities_ui/views/ui.py,sha256=CiwVuk6dqx4sJaT-3nwpo9y-XNLUnO589x9Ln4hXoV8,3009
35
+ invenio_app_rdm/communities_ui/views/communities.py,sha256=21QuhN6m1uWjKrDaxzuZekVQbVetqDQ5Nm2On-tmljQ,6725
36
+ invenio_app_rdm/communities_ui/views/ui.py,sha256=YZ9yiZazEutwkpR4xEolLe6mUtiTJrxVdCOtQGAILOw,3007
36
37
  invenio_app_rdm/fixtures/__init__.py,sha256=XwWy4U66FkpWOEBFfn5EnXfuTKlXnh3HWZNBMDX4Rgk,1512
37
38
  invenio_app_rdm/fixtures/oai_sets.py,sha256=ZoS94FNkIsdEJWHihZRYvFAstp3GBrZ0viDml9mQXOI,621
38
39
  invenio_app_rdm/fixtures/pages.py,sha256=v1ipq8ues_m3y3Y5pSfcIeKNPI5bhwAbUZcpbE_z_ZA,2053
@@ -41,6 +42,7 @@ invenio_app_rdm/fixtures/data/pages.yaml,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
41
42
  invenio_app_rdm/fixtures/pages/.gitkeep,sha256=1HVs32jZTGcMkk-dV9RHGPZm5FdydwFIZDW1epflLF8,68
42
43
  invenio_app_rdm/records_ui/__init__.py,sha256=c4_HH3R7fTOp7AnNQSF4P9h_mwOvL0SE9tkpo6SBnT8,327
43
44
  invenio_app_rdm/records_ui/searchapp.py,sha256=QD5fTdimVUC5K4ERVBjgXHZdbC3ZkgcR8LSIxFTPBQY,2697
45
+ invenio_app_rdm/records_ui/sitemap.py,sha256=erWpwi8lx17ATicBo3dTwMiEEwHTilL8xTAkNCC3J4U,1619
44
46
  invenio_app_rdm/records_ui/utils.py,sha256=0ljPFPC1dAEY_ySZSIT_LRYka2bfsUyvFk_QQAmhYQ4,2687
45
47
  invenio_app_rdm/records_ui/previewer/__init__.py,sha256=T32i_ssGKONDpNB3gECpn20ubHvGYYVrNuIgCADioOM,267
46
48
  invenio_app_rdm/records_ui/previewer/iiif_simple.py,sha256=lGxB3g0hNVJDWnq5jV_KrKPwC-LR1C51DMjas1-UpBM,1589
@@ -104,18 +106,20 @@ invenio_app_rdm/requests_ui/views/__init__.py,sha256=7QiAyRq8Eu84IXwjzxK63vNeTZn
104
106
  invenio_app_rdm/requests_ui/views/requests.py,sha256=Ww3ewDciAvcrheOwtirS6Qewj21FQ8R1b42Og0_r_3w,16149
105
107
  invenio_app_rdm/requests_ui/views/ui.py,sha256=DBysYQa__gOCg-pikO6HmoVLmRmMAVWeTBiYhPa7PmA,2359
106
108
  invenio_app_rdm/theme/__init__.py,sha256=QbkxNjjOmGKRlie96HfTXgnFeVQjOX0GdiZnHP7pIhs,277
107
- invenio_app_rdm/theme/views.py,sha256=Ucn6o7mF8qR7gtOeliKC73gIBhy5LgY65rvteC1Uiog,4312
108
- invenio_app_rdm/theme/webpack.py,sha256=5oi0YBD84y8246JYGtSNmNbRUH-bz_G8WrSRRDEyplw,5201
109
+ invenio_app_rdm/theme/views.py,sha256=mrcxejY9PlYwEqh8f0ojKX4CtmD9jz4f9rU-5aLZszU,4457
110
+ invenio_app_rdm/theme/webpack.py,sha256=aPWl26SIJApTCN9IESlUwbCXNaUC5yAoGJFSC-omOwk,5247
109
111
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/theme.js,sha256=EBda1oklPz8u6cDz5fHU8EeDjUqyNMzOL8Quik-lCks,4592
110
112
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/utils.js,sha256=oTCQkmr7j6FwVsOfM6hsKrPHfadW7m9IurrqYVDgxDw,3628
111
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewAction.js,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
112
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/index.js,sha256=7glSWacd986Zu6l_Ob7IXp4uNWA0f51FBfRv4HZxjYU,965
113
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/search/SearchResultItemLayout.js,sha256=wXwMfu8u02A3KT_xZbalntDGvLwVFc9AlorUTuiSqdQ,2268
113
+ invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/AuditLogActions.js,sha256=ugQ-0b_6_O5rDeP7JUlNJ5SLGGlip_tP3OoTT4hRcak,3984
114
+ invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewJson.js,sha256=UX4-c4gtXOih4T7GQ1c_9zvlAEa0ljTiz22GU8A05Ps,955
115
+ invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewRecentChanges.js,sha256=RKqpLDHZR1UNJjPYBC-XhSr4YVv5B4_BbUxAWhEqZOg,3279
116
+ invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/index.js,sha256=Ruks4rwRBgtKrFop72ZoGNr4-BXoqqv7I-qiflZWzKg,1078
117
+ invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/search/SearchResultItemLayout.js,sha256=CvH3a5Ws57x_FqZjK6vIz1AO4s6WmI0T-BkHNd8kOo0,3077
114
118
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/search/index.js,sha256=q1WaQ-kNNMvNdnsONMw2c4GWobizoPWsmIdWL2fRCPc,283
115
119
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/CompareRevisionsDropdown.js,sha256=BNdMxfFYPhlrGKPg47oc4X8ILllfCngN61L1b7Yt_8Q,2483
116
120
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/ImpersonateUser.js,sha256=1tnHc9PaCQvVS1PVsDWtfpWzVxJJ5_eltn9WJEYygiY,2366
117
121
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/ImpersonateUserForm.js,sha256=Z21KrMyAJ1rKF5IEzM088-pTvTga21LBnG4GPYvh5g4,6890
118
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/RevisionsDiffViewer.js,sha256=-2khcBmWr3zztAjy3mRz4d9gu8b8IAZtWbcnwnD5eAk,1932
122
+ invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/RevisionsDiffViewer.js,sha256=Q-aAVC9jhOaOb7rL9SD48oGuI1fTmoskX8tKGRnpt9c,1921
119
123
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/SetQuotaAction.js,sha256=wwvYfTJ7pBEdoeqcEqmxFLaEwpJnnFW0oRQTyAdDSBw,3038
120
124
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/SetQuotaForm.js,sha256=Ltr03KlCogkg2NjqWc1GkxJlYPWB2LDLHL04w6eJiRU,5749
121
125
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/index.js,sha256=soELMxc1jf_rL62CJ9wtWGVG13yk1PRY7JqseqnKkqU,297
@@ -130,9 +134,9 @@ invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/recor
130
134
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RestoreConfirmation.js,sha256=8hPHqYpvXuzaeFeGbs_XVhK3O4Wd941JGU0l7ylaQhY,3160
131
135
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/TombstoneForm.js,sha256=ip9H3wYZJl0oxYXyUgJlzIxyeT8FGAmSoEoe59U5hVQ,7048
132
136
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/index.js,sha256=kWIIp7kzH3oe4xbByiUC3SpgEjAt4R3mWH8vneGWhiU,1460
133
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/api.js,sha256=aVg7q92xn-wRx7Uff0EXBA04qYrvhYNu7IbbzfDT_LY,982
137
+ invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/api.js,sha256=NxrBwrejTwqBq0LMVAuQeyFLIlwDAVHGbJi009TiLEQ,1181
134
138
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/index.js,sha256=8D199izj4qOxNVS1XrS3JutmuBYIjHkvshUdv1aU92U,261
135
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/routes.js,sha256=scsibLhOtl8m6rI1w2IZEgW5eP_z8nRPkBSSFJXoOKQ,668
139
+ invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/routes.js,sha256=4Jg17NQH_CMbI3ydjyFStMZ4W5VkXKNavkX5fmDBgwc,920
136
140
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/AdministrationSearchLayout.js,sha256=3pRQVkFOnyqRFWmbE3vXMB75Vnrvf-Y5pzZF79iT9q0,1854
137
141
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/RecordSearchLayout.js,sha256=F3Ht0kMf6-cSmbTSRo-PnJLneCqoqh7d0ea1A2Lj2i8,2544
138
142
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/SearchResultItemLayout.js,sha256=CsbdG5fVx2hw1SenJ5wHVd468-n5qp2yhB5x3ceGCuE,5611
@@ -282,7 +286,7 @@ invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/item.v
282
286
  invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/i18next-scanner.config.js,sha256=FeZ5h48vChch-KettQYhwpwRUladl2HXQJ_6m9kEMXQ,1860
283
287
  invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/i18next.js,sha256=t-NhnwBb106Zxx66Hz7BBV7nxtC_Tj6_0HOncxUkzww,1070
284
288
  invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/package-lock.json,sha256=5A9oCU6BbPW4FH4uFR8fxMHzwEo3HnjWFohHs6J13Cw,58457
285
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/package.json,sha256=ITuri6tLK_zJr8eBrwVvQEBCnzzLnHSYrGYpsWUICco,945
289
+ invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/package.json,sha256=5wzqrQr6HXsh_gsuMLHbXByWILvldYej2aP5CijBizw,979
286
290
  invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/translations.pot,sha256=S5c69QZYivrze2u_gPbz7jxr1CuilDfnsXvkQ6fRaDw,18625
287
291
  invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/index.js,sha256=9nLEfmBCv9z6skLd1nnOE8XEWugRbk_QHfimnFJBvzA,2898
288
292
  invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ar/messages.po,sha256=t0ijS-AHKe8xZL6FVmqcvlw6sSqyatfeI1ezE18MIzU,6654
@@ -345,7 +349,6 @@ invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/z
345
349
  invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_TW/translations.json,sha256=2-PuJiIAPYQhYFP3pMWEFLAkHGecuT40_Qm33dtm2Xk,9377
346
350
  invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/scripts/compileCatalog.js,sha256=O1G3n8drTU_MaMxfHmvwnPXWKbb5-9oSD_vdCocck1I,1216
347
351
  invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/scripts/initCatalog.js,sha256=PKt4RTa29L53rjB_hZnEHahZA4YprWDtWq4nlO7Z0p0,728
348
- invenio_app_rdm/theme/static/robots.txt,sha256=aBc1Jm1Y4Tgbl2oCaK-12akWEkeXexCjSLTjB6yiuHM,205
349
352
  invenio_app_rdm/theme/static/icons/licenses/cc-by-icon.svg,sha256=Aogts2TDR_M090vHNBA2UhEDu79cdTPyjnoNmeDxFII,9719
350
353
  invenio_app_rdm/theme/static/icons/licenses/cc-by-nc-eu-icon.svg,sha256=rJQn1RpDLLHUjVXs3nsxfduzOta1HZ1hBAhtNsvLtcU,15478
351
354
  invenio_app_rdm/theme/static/icons/licenses/cc-by-nc-icon.svg,sha256=65P9CKCvlT-AL8a1mkf1ugPBnQqyBVpDBgiSg20fa8w,15083
@@ -378,6 +381,7 @@ invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/intro_section.html,s
378
381
  invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/javascript.html,sha256=20O9okaOd_bqpBbuq9K0zqY0UUNXaFVKIslgPArs67U,364
379
382
  invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page.html,sha256=zwIZmRWIJpz9UQpEqM3oTaSzlmek6tdP8VDR1Mugka0,951
380
383
  invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page_cover.html,sha256=D-NNfCX38wRjHOq1kzPPncKKUd0b9U1al-NMy48dKvU,357
384
+ invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/robots.txt,sha256=KlcyEFTFpgcsDnKNoFTWM2U5uNchvsYJtoS0PsMAG9M,315
381
385
  invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/searchbar.html,sha256=tvzez_2CE86wl_lipD44MD1swZcZw5uYqXEvvPMkBIo,2222
382
386
  invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/site_footer.html,sha256=C0xluZe7KCkvRKeeMIt6P8v_EfWyuMCQ_JQvlI0M9Xw,1037
383
387
  invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/files_integrity_report/email/files_integrity_report.html,sha256=mwbLrf2xabxq0dLQzUNWGHeYVoySo9GaaydT-FKC9g8,1237
@@ -475,9 +479,9 @@ invenio_app_rdm/users_ui/views/__init__.py,sha256=SMdY2NJj9GICfr3Xuok7qdNYVtA2bJ
475
479
  invenio_app_rdm/users_ui/views/dashboard.py,sha256=iUn2PrODAwb8ugmMosJKAjPhUzjCiWiAWoXQr9RUFuc,1793
476
480
  invenio_app_rdm/users_ui/views/ui.py,sha256=W_eXM8dLVIrNHQB2UEh37C9BYoHauft6RyvcDNFHovA,1742
477
481
  invenio_app_rdm/utils/files.py,sha256=CruDyO2gDVadSlWEJD-WHpWHeOQ0juh-Ei9jz3D9yjc,3923
478
- invenio_app_rdm-13.0.0b3.dev15.dist-info/licenses/LICENSE,sha256=AZXFHRrZa5s4m9DV7zZr4bPGTMUvcEPCodeV_AmFI8k,1204
482
+ invenio_app_rdm-13.0.0b3.dev17.dist-info/licenses/LICENSE,sha256=AZXFHRrZa5s4m9DV7zZr4bPGTMUvcEPCodeV_AmFI8k,1204
479
483
  tests/__init__.py,sha256=yKVf0yYRuxmXvyAtLjmfpHGVCsEkZOhs_FojAAM_w-8,244
480
- tests/conftest.py,sha256=FQ_aSBxGo0gNfV64RJ117GcmgjVbZKwpxF9_3VNdNJY,7931
484
+ tests/conftest.py,sha256=kxOf2CiULBuE9m-ncNv4AtofUVx7iSnvVljlsdI_iCE,11507
481
485
  tests/test_tasks.py,sha256=YAf2mryFK6Vfzk2053XLBA2e92vbNCTWqJ6ThWhGOuQ,6645
482
486
  tests/test_utils.py,sha256=nvj59DibjRZgLzwnch83tyCw9R1DEuDSQhU7v7mEOT0,1897
483
487
  tests/test_version.py,sha256=c_ayM-WLlD0Q6z939sBnFpMTY160TmFg-9-hGsPa7FE,410
@@ -501,16 +505,17 @@ tests/redirector/__init__.py,sha256=yKVf0yYRuxmXvyAtLjmfpHGVCsEkZOhs_FojAAM_w-8,
501
505
  tests/redirector/conftest.py,sha256=KAbp0R8tgGoNvMr8mJ1G2AZX6PzLw-PChtbucrLn5_o,1676
502
506
  tests/redirector/test_redirector.py,sha256=iATYglIw3QSoUKpspQCAM4SaG_WmzjL7r1Nmew_KlGY,1002
503
507
  tests/ui/__init__.py,sha256=yKVf0yYRuxmXvyAtLjmfpHGVCsEkZOhs_FojAAM_w-8,244
504
- tests/ui/conftest.py,sha256=3Msw0lfBoboQ7X-oZv_wGN7UF6StUpHPRVzRvbjhpoI,3472
508
+ tests/ui/conftest.py,sha256=Yx6_wQtAaPG3dll4UtxxN37nEr87Y_8kos8TzrijHbw,3380
505
509
  tests/ui/test_deposits.py,sha256=BehQzo1r3_f4Uc9jcXRddd9bS5GfQ3jRRYOM0AMbi3w,3792
506
510
  tests/ui/test_export_formats.py,sha256=pCXJCTp9ykEWb2oB-ynGjQDhFaVsOs31ym0stwfWCaQ,909
507
511
  tests/ui/test_file_download.py,sha256=o4JHkFyJxZDaQ5NHRZR_PV98jS9UtklbOZPpduzwWKw,2436
508
512
  tests/ui/test_filters.py,sha256=Q90wsJffjMVir7wNX8taGf2KZleLtPbXZXHLTkBpzLA,284
513
+ tests/ui/test_robotstxt.py,sha256=Gn0bVPJTDRQH6DO5GGZyD6iMel1UxWRHP5MnGQZ0j18,1138
509
514
  tests/ui/test_signposting_ui.py,sha256=KCSjQlMD2VKlwQCyZYDwYjtVNL35x3u-ZC4ceD5y21w,3847
510
- tests/ui/test_static.py,sha256=vO3OQAOhrQESJifnQfM1pw7JYz3J874O8BAb7Cc_PPA,868
515
+ tests/ui/test_sitemaps.py,sha256=hPeGbo9v5Q55swr-ZyudAVYm7aJ6lCKV51Vtupk450Q,3180
511
516
  tests/ui/test_stats_ui.py,sha256=LHa_0hjvpYvliSk_jknWy-90CO82jVElUfK5Ua_ZmfA,3554
512
- invenio_app_rdm-13.0.0b3.dev15.dist-info/METADATA,sha256=hik85SKwQd8p1ztdBPJMREQnVEdMSnsBBp6RB0bNmzQ,14090
513
- invenio_app_rdm-13.0.0b3.dev15.dist-info/WHEEL,sha256=egKm5cKfE6OqlHwodY8Jjp4yqZDBXgsj09UsV5ojd_U,109
514
- invenio_app_rdm-13.0.0b3.dev15.dist-info/entry_points.txt,sha256=rfzEeOEdtGy99NlpWzeW-32CoO5XrEpBvlZwLD2Th88,2158
515
- invenio_app_rdm-13.0.0b3.dev15.dist-info/top_level.txt,sha256=NqTqrntInEAci7EXcNBvouXFMqwyjVQhEI0b7izYRBY,22
516
- invenio_app_rdm-13.0.0b3.dev15.dist-info/RECORD,,
517
+ invenio_app_rdm-13.0.0b3.dev17.dist-info/METADATA,sha256=zVUvzrmTnfyjKeud1ylzuoeclZB0Y6EzOHxZyU8kUPg,14456
518
+ invenio_app_rdm-13.0.0b3.dev17.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
519
+ invenio_app_rdm-13.0.0b3.dev17.dist-info/entry_points.txt,sha256=rfzEeOEdtGy99NlpWzeW-32CoO5XrEpBvlZwLD2Th88,2158
520
+ invenio_app_rdm-13.0.0b3.dev17.dist-info/top_level.txt,sha256=NqTqrntInEAci7EXcNBvouXFMqwyjVQhEI0b7izYRBY,22
521
+ invenio_app_rdm-13.0.0b3.dev17.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.8.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any
tests/conftest.py CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  # Copyright (C) 2019-2025 CERN.
4
- # Copyright (C) 2019-2021 Northwestern University.
4
+ # Copyright (C) 2019-2025 Northwestern University.
5
5
  # Copyright (C) 2024-2025 Graz University of Technology.
6
6
  #
7
7
  # Invenio App RDM is free software; you can redistribute it and/or modify it
@@ -9,6 +9,9 @@
9
9
 
10
10
  """Common pytest fixtures and plugins."""
11
11
 
12
+ import copy
13
+ from collections import namedtuple
14
+
12
15
  # Monkey patch Werkzeug 2.1
13
16
  # Flask-Login uses the safe_str_cmp method which has been removed in Werkzeug
14
17
  # 2.1. Flask-Login v0.6.0 (yet to be released at the time of writing) fixes the
@@ -27,8 +30,6 @@ except AttributeError:
27
30
 
28
31
  security.safe_str_cmp = hmac.compare_digest
29
32
 
30
- from collections import namedtuple
31
-
32
33
  import pytest
33
34
  from flask_security import login_user
34
35
  from flask_security.utils import hash_password
@@ -67,6 +68,12 @@ def subjects_service(app):
67
68
  return current_service_registry.get("subjects")
68
69
 
69
70
 
71
+ @pytest.fixture(scope="module")
72
+ def records_service(app):
73
+ """Records service."""
74
+ return current_service_registry.get("records")
75
+
76
+
70
77
  pytest_plugins = ("celery.contrib.pytest",)
71
78
 
72
79
 
@@ -168,10 +175,16 @@ def client_with_login(client, users):
168
175
  return client
169
176
 
170
177
 
178
+ def create_vocabulary_type(id_, pid_type):
179
+ """Create vocabulary type."""
180
+ vocabulary_service = current_service_registry.get("vocabularies")
181
+ return vocabulary_service.create_type(system_identity, id_, pid_type)
182
+
183
+
171
184
  @pytest.fixture(scope="module")
172
185
  def resource_type_type(app):
173
186
  """Resource type vocabulary type."""
174
- return vocabulary_service.create_type(system_identity, "resourcetypes", "rsrct")
187
+ return create_vocabulary_type("resourcetypes", "rsrct")
175
188
 
176
189
 
177
190
  @pytest.fixture(scope="module")
@@ -207,7 +220,7 @@ def resource_type_item(app, resource_type_type):
207
220
  @pytest.fixture(scope="module")
208
221
  def languages_type(app):
209
222
  """Language vocabulary type."""
210
- return vocabulary_service.create_type(system_identity, "languages", "lng")
223
+ return create_vocabulary_type("languages", "lng")
211
224
 
212
225
 
213
226
  @pytest.fixture(scope="module")
@@ -260,13 +273,118 @@ def subject_item(app, subjects_mesh_scheme, subjects_service):
260
273
  return subj
261
274
 
262
275
 
276
+ @pytest.fixture(scope="module")
277
+ def communitytypes_type(app):
278
+ """Creates and retrieves a vocabulary type."""
279
+ return create_vocabulary_type("communitytypes", "comtyp")
280
+
281
+
282
+ @pytest.fixture(scope="module")
283
+ def communitytypes(communitytypes_type):
284
+ """Community types."""
285
+ vocabulary_service = current_service_registry.get("vocabularies")
286
+ type_dicts = [
287
+ {"id": "organization", "title": {"en": "Organization"}},
288
+ {"id": "event", "title": {"en": "Event"}},
289
+ {"id": "topic", "title": {"en": "Topic"}},
290
+ {"id": "project", "title": {"en": "Project"}},
291
+ ]
292
+ [t.update({"type": "communitytypes"}) for t in type_dicts]
293
+ types = [
294
+ vocabulary_service.create(identity=system_identity, data=t) for t in type_dicts
295
+ ]
296
+ vocabulary_service.indexer.refresh()
297
+ return types
298
+
299
+
300
+ @pytest.fixture()
301
+ def community_input():
302
+ """Community input dict."""
303
+ return {
304
+ "access": {
305
+ "visibility": "public",
306
+ "member_policy": "open",
307
+ "record_policy": "open",
308
+ },
309
+ "slug": "my_community_id",
310
+ "metadata": {
311
+ "title": "My Community",
312
+ # "description": "This is an example Community.",
313
+ "type": {"id": "event"},
314
+ # "curation_policy": "This is the kind of records we accept.",
315
+ # "website": "https://inveniosoftware.org/",
316
+ },
317
+ }
318
+
319
+
263
320
  RunningApp = namedtuple(
264
321
  "RunningApp",
265
- ["app", "location", "resource_type_item", "language_item", "subject_item"],
322
+ [
323
+ "app",
324
+ "location",
325
+ "resource_type_item",
326
+ "language_item",
327
+ "subject_item",
328
+ "communitytypes",
329
+ ],
266
330
  )
267
331
 
268
332
 
269
333
  @pytest.fixture
270
- def running_app(app, location, resource_type_item, language_item, subject_item):
334
+ def running_app(
335
+ app, location, resource_type_item, language_item, subject_item, communitytypes
336
+ ):
271
337
  """Fixture mimicking a running app."""
272
- return RunningApp(app, location, resource_type_item, language_item, subject_item)
338
+ return RunningApp(
339
+ app, location, resource_type_item, language_item, subject_item, communitytypes
340
+ )
341
+
342
+
343
+ @pytest.fixture()
344
+ def create_record(running_app, minimal_record, records_service):
345
+ """Record creation and publication function fixture."""
346
+ files_service = records_service.draft_files
347
+
348
+ def _create_record(identity=None, data=minimal_record, files=None):
349
+ """Create and publish an RDMRecord.
350
+
351
+ Optionally assign it files.
352
+ """
353
+ idty = identity or system_identity
354
+ data_copy = copy.deepcopy(data)
355
+ if files:
356
+ data_copy["files"] = {"enabled": True}
357
+
358
+ draft_data = records_service.create(idty, data_copy)._record
359
+ pid_value_of_draft = draft_data.pid.pid_value
360
+ if files:
361
+ files_service.init_files(idty, pid_value_of_draft, [f.data for f in files])
362
+ for f in files:
363
+ files_service.set_file_content(
364
+ idty,
365
+ id_=pid_value_of_draft,
366
+ file_key=f.data["key"],
367
+ stream=f.content,
368
+ content_length=f.content.getbuffer().nbytes,
369
+ )
370
+ files_service.commit_file(
371
+ idty, id_=pid_value_of_draft, file_key=f.data["key"]
372
+ )
373
+
374
+ record_result = records_service.publish(idty, id_=pid_value_of_draft)
375
+ return record_result
376
+
377
+ return _create_record
378
+
379
+
380
+ @pytest.fixture()
381
+ def create_community(running_app, community_input):
382
+ """Community creation function fixture."""
383
+ community_service = current_service_registry.get("communities")
384
+
385
+ def _create_community(identity=None, data=community_input):
386
+ """Create a community."""
387
+ idty = identity or system_identity
388
+ return community_service.create(idty, data)
389
+
390
+ return _create_community
tests/ui/conftest.py CHANGED
@@ -20,7 +20,7 @@ from flask_webpackext.manifest import (
20
20
  )
21
21
  from invenio_access.permissions import any_user, authenticated_user, system_identity
22
22
  from invenio_app.factory import create_ui
23
- from invenio_rdm_records.proxies import current_rdm_records
23
+ from invenio_rdm_records.proxies import current_rdm_records_service
24
24
  from invenio_search import current_search
25
25
 
26
26
 
@@ -67,11 +67,9 @@ def index_templates(running_app):
67
67
 
68
68
 
69
69
  @pytest.fixture()
70
- def record(running_app, minimal_record):
70
+ def record(running_app, minimal_record, create_record):
71
71
  """Create and publish a record."""
72
- s = current_rdm_records.records_service
73
- draft = s.create(system_identity, minimal_record)
74
- return s.publish(system_identity, draft.id)
72
+ return create_record(data=minimal_record)
75
73
 
76
74
 
77
75
  @pytest.fixture()
@@ -83,7 +81,7 @@ def draft_with_file(running_app, minimal_record, users):
83
81
  user_identity = Identity(users["user1"].id)
84
82
  user_identity.provides.add(any_user)
85
83
  user_identity.provides.add(authenticated_user)
86
- record_service = current_rdm_records.records_service
84
+ record_service = current_rdm_records_service
87
85
  file_service = record_service.draft_files
88
86
 
89
87
  draft = record_service.create(user_identity, minimal_record)
@@ -95,7 +93,7 @@ def draft_with_file(running_app, minimal_record, users):
95
93
  "metadata": {
96
94
  "description": "Published article PDF.",
97
95
  },
98
- }
96
+ },
99
97
  ]
100
98
  file_service.init_files(system_identity, draft.id, file_to_initialise)
101
99
  content = BytesIO(b"test file content")
@@ -113,5 +111,5 @@ def draft_with_file(running_app, minimal_record, users):
113
111
  @pytest.fixture()
114
112
  def record_with_file(draft_with_file):
115
113
  """Create and publish a record with file."""
116
- record_service = current_rdm_records.records_service
114
+ record_service = current_rdm_records_service
117
115
  return record_service.publish(system_identity, draft_with_file.id)
@@ -0,0 +1,35 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2022 CERN.
4
+ # Copyright (C) 2025 Northwestern University.
5
+ #
6
+ # Invenio-RDM is free software; you can redistribute it and/or modify
7
+ # it under the terms of the MIT License; see LICENSE file for more details.
8
+
9
+ import pytest
10
+ from invenio_cache import current_cache
11
+ from invenio_sitemap import SitemapIndexCache
12
+
13
+
14
+ @pytest.fixture
15
+ def cache_for_sitemap_index(app):
16
+ """Primed cache with a sitemap index entry."""
17
+ try:
18
+ cache = SitemapIndexCache(current_cache)
19
+ cache.delete_included_and_higher(0)
20
+ cache.set(0, "unimportant data")
21
+ yield cache
22
+ finally:
23
+ cache.delete_included_and_higher(0)
24
+
25
+
26
+ def test_robotstxt(app, client, cache_for_sitemap_index):
27
+ """Check if robots.txt returns a string response."""
28
+ response = client.get("/robots.txt")
29
+
30
+ assert 200 == response.status_code
31
+ assert type(response.text) == str
32
+ assert "Disallow: /search" in response.text
33
+ assert "Disallow: /api" in response.text
34
+ assert "Disallow: /administration" in response.text
35
+ assert "Sitemap: https://127.0.0.1:5000/sitemap_index_0.xml" in response.text