Browse Source

convert slug page to html-documents

Guénaël Muller 6 years ago
parent
commit
a05c27a786

+ 3 - 2
tracim/lib/utils/authorization.py View File

@@ -1,7 +1,6 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 import typing
3 3
 from typing import TYPE_CHECKING
4
-
5 4
 import functools
6 5
 from pyramid.interfaces import IAuthorizationPolicy
7 6
 from zope.interface import implementer
@@ -58,6 +57,7 @@ def require_same_user_or_profile(group: int):
58 57
     :return:
59 58
     """
60 59
     def decorator(func):
60
+        @functools.wraps(func)
61 61
         def wrapper(self, context, request: 'TracimRequest'):
62 62
             auth_user = request.current_user
63 63
             candidate_user = request.candidate_user
@@ -78,6 +78,7 @@ def require_profile(group: int):
78 78
     :return:
79 79
     """
80 80
     def decorator(func):
81
+        @functools.wraps(func)
81 82
         def wrapper(self, context, request: 'TracimRequest'):
82 83
             user = request.current_user
83 84
             if user.profile.id >= group:
@@ -96,7 +97,7 @@ def require_workspace_role(minimal_required_role: int):
96 97
     :return: decorator
97 98
     """
98 99
     def decorator(func):
99
-
100
+        @functools.wraps(func)
100 101
         def wrapper(self, context, request: 'TracimRequest'):
101 102
             user = request.current_user
102 103
             workspace = request.current_workspace

+ 3 - 1
tracim/models/contents.py View File

@@ -160,7 +160,7 @@ markdownpluspage_type = NewContentType(
160 160
 )
161 161
 
162 162
 htmlpage_type = NewContentType(
163
-    slug='page',
163
+    slug='html-documents',
164 164
     fa_icon=htmlpage.fa_icon,
165 165
     hexcolor=htmlpage.hexcolor,
166 166
     label='Text Document',
@@ -231,6 +231,8 @@ class ContentTypeLegacy(NewContentType):
231 231
     MarkdownPage = markdownpluspage_type.slug
232 232
 
233 233
     def __init__(self, slug: str):
234
+        if slug == 'page':
235
+            slug = ContentTypeLegacy.Page
234 236
         for content_type in ALL_CONTENTS_DEFAULT_TYPES:
235 237
             if slug == content_type.slug:
236 238
                 super(ContentTypeLegacy, self).__init__(

+ 8 - 8
tracim/tests/functional/test_contents.py View File

@@ -44,7 +44,7 @@ class TestHtmlDocuments(FunctionalTest):
44 44
             status=200
45 45
         )   # nopep8
46 46
         content = res.json_body
47
-        assert content['content_type'] == 'page'
47
+        assert content['content_type'] == 'html-documents'
48 48
         assert content['content_id'] == 6
49 49
         assert content['is_archived'] is False
50 50
         assert content['is_deleted'] is False
@@ -90,7 +90,7 @@ class TestHtmlDocuments(FunctionalTest):
90 90
             status=200
91 91
         )
92 92
         content = res.json_body
93
-        assert content['content_type'] == 'page'
93
+        assert content['content_type'] == 'html-documents'
94 94
         assert content['content_id'] == 6
95 95
         assert content['is_archived'] is False
96 96
         assert content['is_deleted'] is False
@@ -117,7 +117,7 @@ class TestHtmlDocuments(FunctionalTest):
117 117
             status=200
118 118
         )   # nopep8
119 119
         content = res.json_body
120
-        assert content['content_type'] == 'page'
120
+        assert content['content_type'] == 'html-documents'
121 121
         assert content['content_id'] == 6
122 122
         assert content['is_archived'] is False
123 123
         assert content['is_deleted'] is False
@@ -159,7 +159,7 @@ class TestHtmlDocuments(FunctionalTest):
159 159
         revisions = res.json_body
160 160
         assert len(revisions) == 3
161 161
         revision = revisions[0]
162
-        assert revision['content_type'] == 'page'
162
+        assert revision['content_type'] == 'html-documents'
163 163
         assert revision['content_id'] == 6
164 164
         assert revision['is_archived'] is False
165 165
         assert revision['is_deleted'] is False
@@ -180,7 +180,7 @@ class TestHtmlDocuments(FunctionalTest):
180 180
         assert revision['author']['avatar_url'] is None
181 181
         assert revision['author']['public_name'] == 'Global manager'
182 182
         revision = revisions[1]
183
-        assert revision['content_type'] == 'page'
183
+        assert revision['content_type'] == 'html-documents'
184 184
         assert revision['content_id'] == 6
185 185
         assert revision['is_archived'] is False
186 186
         assert revision['is_deleted'] is False
@@ -201,7 +201,7 @@ class TestHtmlDocuments(FunctionalTest):
201 201
         assert revision['author']['avatar_url'] is None
202 202
         assert revision['author']['public_name'] == 'Global manager'
203 203
         revision = revisions[2]
204
-        assert revision['content_type'] == 'page'
204
+        assert revision['content_type'] == 'html-documents'
205 205
         assert revision['content_id'] == 6
206 206
         assert revision['is_archived'] is False
207 207
         assert revision['is_deleted'] is False
@@ -243,7 +243,7 @@ class TestHtmlDocuments(FunctionalTest):
243 243
             status=200
244 244
         )   # nopep8
245 245
         content = res.json_body
246
-        assert content['content_type'] == 'page'
246
+        assert content['content_type'] == 'html-documents'
247 247
         assert content['content_id'] == 6
248 248
         assert content['status'] == 'open'
249 249
 
@@ -260,7 +260,7 @@ class TestHtmlDocuments(FunctionalTest):
260 260
             status=200
261 261
         )   # nopep8
262 262
         content = res.json_body
263
-        assert content['content_type'] == 'page'
263
+        assert content['content_type'] == 'html-documents'
264 264
         assert content['content_id'] == 6
265 265
         assert content['status'] == 'closed-deprecated'
266 266
 

+ 1 - 1
tracim/tests/functional/test_system.py View File

@@ -124,7 +124,7 @@ class TestContentsTypesEndpoint(FunctionalTest):
124 124
         assert len(content_type['available_statuses']) == 4
125 125
 
126 126
         content_type = res[3]
127
-        assert content_type['slug'] == 'page'
127
+        assert content_type['slug'] == 'html-documents'
128 128
         assert content_type['fa_icon'] == 'file-text-o'
129 129
         assert content_type['hexcolor'] == '#3f52e3'
130 130
         assert content_type['label'] == 'Text Document'

+ 26 - 26
tracim/tests/functional/test_workspaces.py View File

@@ -247,7 +247,7 @@ class TestWorkspaceContents(FunctionalTest):
247 247
         assert content['show_in_ui'] is True
248 248
         assert content['slug'] == 'tools'
249 249
         assert content['status'] == 'open'
250
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
250
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
251 251
         assert content['workspace_id'] == 1
252 252
         content = res[1]
253 253
         assert content['content_id'] == 2
@@ -258,7 +258,7 @@ class TestWorkspaceContents(FunctionalTest):
258 258
         assert content['show_in_ui'] is True
259 259
         assert content['slug'] == 'menus'
260 260
         assert content['status'] == 'open'
261
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
261
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
262 262
         assert content['workspace_id'] == 1
263 263
         content = res[2]
264 264
         assert content['content_id'] == 11
@@ -269,7 +269,7 @@ class TestWorkspaceContents(FunctionalTest):
269 269
         assert content['show_in_ui'] is True
270 270
         assert content['slug'] == 'current-menu'
271 271
         assert content['status'] == 'open'
272
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
272
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
273 273
         assert content['workspace_id'] == 1
274 274
 
275 275
     # Root related
@@ -299,7 +299,7 @@ class TestWorkspaceContents(FunctionalTest):
299 299
         # TODO - G.M - 30-05-2018 - Check this test
300 300
         assert len(res) == 4
301 301
         content = res[1]
302
-        assert content['content_type'] == 'page'
302
+        assert content['content_type'] == 'html-documents'
303 303
         assert content['content_id'] == 15
304 304
         assert content['is_archived'] is False
305 305
         assert content['is_deleted'] is False
@@ -308,11 +308,11 @@ class TestWorkspaceContents(FunctionalTest):
308 308
         assert content['show_in_ui'] is True
309 309
         assert content['slug'] == 'new-fruit-salad'
310 310
         assert content['status'] == 'open'
311
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
311
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
312 312
         assert content['workspace_id'] == 3
313 313
 
314 314
         content = res[2]
315
-        assert content['content_type'] == 'page'
315
+        assert content['content_type'] == 'html-documents'
316 316
         assert content['content_id'] == 16
317 317
         assert content['is_archived'] is True
318 318
         assert content['is_deleted'] is False
@@ -321,11 +321,11 @@ class TestWorkspaceContents(FunctionalTest):
321 321
         assert content['show_in_ui'] is True
322 322
         assert content['slug'].startswith('fruit-salad')
323 323
         assert content['status'] == 'open'
324
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
324
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
325 325
         assert content['workspace_id'] == 3
326 326
 
327 327
         content = res[3]
328
-        assert content['content_type'] == 'page'
328
+        assert content['content_type'] == 'html-documents'
329 329
         assert content['content_id'] == 17
330 330
         assert content['is_archived'] is False
331 331
         assert content['is_deleted'] is True
@@ -334,7 +334,7 @@ class TestWorkspaceContents(FunctionalTest):
334 334
         assert content['show_in_ui'] is True
335 335
         assert content['slug'].startswith('bad-fruit-salad')
336 336
         assert content['status'] == 'open'
337
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
337
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
338 338
         assert content['workspace_id'] == 3
339 339
 
340 340
     def test_api__get_workspace_content__ok_200__get_only_active_root_content(self):  # nopep8
@@ -362,7 +362,7 @@ class TestWorkspaceContents(FunctionalTest):
362 362
         # TODO - G.M - 30-05-2018 - Check this test
363 363
         assert len(res) == 2
364 364
         content = res[1]
365
-        assert content['content_type'] == 'page'
365
+        assert content['content_type'] == 'html-documents'
366 366
         assert content['content_id'] == 15
367 367
         assert content['is_archived'] is False
368 368
         assert content['is_deleted'] is False
@@ -371,7 +371,7 @@ class TestWorkspaceContents(FunctionalTest):
371 371
         assert content['show_in_ui'] is True
372 372
         assert content['slug'] == 'new-fruit-salad'
373 373
         assert content['status'] == 'open'
374
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
374
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
375 375
         assert content['workspace_id'] == 3
376 376
 
377 377
     def test_api__get_workspace_content__ok_200__get_only_archived_root_content(self):  # nopep8
@@ -398,7 +398,7 @@ class TestWorkspaceContents(FunctionalTest):
398 398
         ).json_body   # nopep8
399 399
         assert len(res) == 1
400 400
         content = res[0]
401
-        assert content['content_type'] == 'page'
401
+        assert content['content_type'] == 'html-documents'
402 402
         assert content['content_id'] == 16
403 403
         assert content['is_archived'] is True
404 404
         assert content['is_deleted'] is False
@@ -407,7 +407,7 @@ class TestWorkspaceContents(FunctionalTest):
407 407
         assert content['show_in_ui'] is True
408 408
         assert content['slug'].startswith('fruit-salad')
409 409
         assert content['status'] == 'open'
410
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
410
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
411 411
         assert content['workspace_id'] == 3
412 412
 
413 413
     def test_api__get_workspace_content__ok_200__get_only_deleted_root_content(self):  # nopep8
@@ -436,7 +436,7 @@ class TestWorkspaceContents(FunctionalTest):
436 436
 
437 437
         assert len(res) == 1
438 438
         content = res[0]
439
-        assert content['content_type'] == 'page'
439
+        assert content['content_type'] == 'html-documents'
440 440
         assert content['content_id'] == 17
441 441
         assert content['is_archived'] is False
442 442
         assert content['is_deleted'] is True
@@ -445,7 +445,7 @@ class TestWorkspaceContents(FunctionalTest):
445 445
         assert content['show_in_ui'] is True
446 446
         assert content['slug'].startswith('bad-fruit-salad')
447 447
         assert content['status'] == 'open'
448
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
448
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
449 449
         assert content['workspace_id'] == 3
450 450
 
451 451
     def test_api__get_workspace_content__ok_200__get_nothing_root_content(self):
@@ -500,7 +500,7 @@ class TestWorkspaceContents(FunctionalTest):
500 500
         ).json_body   # nopep8
501 501
         assert len(res) == 3
502 502
         content = res[0]
503
-        assert content['content_type'] == 'page'
503
+        assert content['content_type'] == 'html-documents'
504 504
         assert content['content_id'] == 12
505 505
         assert content['is_archived'] is False
506 506
         assert content['is_deleted'] is False
@@ -509,11 +509,11 @@ class TestWorkspaceContents(FunctionalTest):
509 509
         assert content['show_in_ui'] is True
510 510
         assert content['slug'] == 'new-fruit-salad'
511 511
         assert content['status'] == 'open'
512
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
512
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
513 513
         assert content['workspace_id'] == 2
514 514
 
515 515
         content = res[1]
516
-        assert content['content_type'] == 'page'
516
+        assert content['content_type'] == 'html-documents'
517 517
         assert content['content_id'] == 13
518 518
         assert content['is_archived'] is True
519 519
         assert content['is_deleted'] is False
@@ -522,11 +522,11 @@ class TestWorkspaceContents(FunctionalTest):
522 522
         assert content['show_in_ui'] is True
523 523
         assert content['slug'].startswith('fruit-salad')
524 524
         assert content['status'] == 'open'
525
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
525
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
526 526
         assert content['workspace_id'] == 2
527 527
 
528 528
         content = res[2]
529
-        assert content['content_type'] == 'page'
529
+        assert content['content_type'] == 'html-documents'
530 530
         assert content['content_id'] == 14
531 531
         assert content['is_archived'] is False
532 532
         assert content['is_deleted'] is True
@@ -535,7 +535,7 @@ class TestWorkspaceContents(FunctionalTest):
535 535
         assert content['show_in_ui'] is True
536 536
         assert content['slug'].startswith('bad-fruit-salad')
537 537
         assert content['status'] == 'open'
538
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
538
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
539 539
         assert content['workspace_id'] == 2
540 540
 
541 541
     def test_api__get_workspace_content__ok_200__get_only_active_folder_content(self):  # nopep8
@@ -571,7 +571,7 @@ class TestWorkspaceContents(FunctionalTest):
571 571
         assert content['show_in_ui'] is True
572 572
         assert content['slug'] == 'new-fruit-salad'
573 573
         assert content['status'] == 'open'
574
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
574
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
575 575
         assert content['workspace_id'] == 2
576 576
 
577 577
     def test_api__get_workspace_content__ok_200__get_only_archived_folder_content(self):  # nopep8
@@ -598,7 +598,7 @@ class TestWorkspaceContents(FunctionalTest):
598 598
         ).json_body   # nopep8
599 599
         assert len(res) == 1
600 600
         content = res[0]
601
-        assert content['content_type'] == 'page'
601
+        assert content['content_type'] == 'html-documents'
602 602
         assert content['content_id'] == 13
603 603
         assert content['is_archived'] is True
604 604
         assert content['is_deleted'] is False
@@ -607,7 +607,7 @@ class TestWorkspaceContents(FunctionalTest):
607 607
         assert content['show_in_ui'] is True
608 608
         assert content['slug'].startswith('fruit-salad')
609 609
         assert content['status'] == 'open'
610
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
610
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
611 611
         assert content['workspace_id'] == 2
612 612
 
613 613
     def test_api__get_workspace_content__ok_200__get_only_deleted_folder_content(self):  # nopep8
@@ -635,7 +635,7 @@ class TestWorkspaceContents(FunctionalTest):
635 635
 
636 636
         assert len(res) == 1
637 637
         content = res[0]
638
-        assert content['content_type'] == 'page'
638
+        assert content['content_type'] == 'html-documents'
639 639
         assert content['content_id'] == 14
640 640
         assert content['is_archived'] is False
641 641
         assert content['is_deleted'] is True
@@ -644,7 +644,7 @@ class TestWorkspaceContents(FunctionalTest):
644 644
         assert content['show_in_ui'] is True
645 645
         assert content['slug'].startswith('bad-fruit-salad')
646 646
         assert content['status'] == 'open'
647
-        assert set(content['sub_content_types']) == {'thread', 'page', 'folder', 'file'}  # nopep8
647
+        assert set(content['sub_content_types']) == {'thread', 'html-documents', 'folder', 'file'}  # nopep8
648 648
         assert content['workspace_id'] == 2
649 649
 
650 650
     def test_api__get_workspace_content__ok_200__get_nothing_folder_content(self):  # nopep8

+ 1 - 1
tracim/views/core_api/system_controller.py View File

@@ -40,7 +40,7 @@ class SystemController(Controller):
40 40
     @hapic.output_body(ContentTypeSchema(many=True),)
41 41
     def content_types(self, context, request: TracimRequest, hapic_data=None):
42 42
         """
43
-        Get list of alls applications installed in this tracim instance.
43
+        Get list of alls content types availables in this tracim instance.
44 44
         """
45 45
 
46 46
         return CONTENT_DEFAULT_TYPE

+ 2 - 2
tracim/views/core_api/user_controller.py View File

@@ -20,12 +20,12 @@ from tracim.views.controllers import Controller
20 20
 from tracim.views.core_api.schemas import UserIdPathSchema
21 21
 from tracim.views.core_api.schemas import WorkspaceDigestSchema
22 22
 
23
-USERS_ENDPOINTS_TAG = 'Users'
23
+USER_ENDPOINTS_TAG = 'Users'
24 24
 
25 25
 
26 26
 class UserController(Controller):
27 27
 
28
-    @hapic.with_api_doc(tags=[USERS_ENDPOINTS_TAG])
28
+    @hapic.with_api_doc(tags=[USER_ENDPOINTS_TAG])
29 29
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
30 30
     @hapic.handle_exception(InsufficientUserProfile, HTTPStatus.FORBIDDEN)
31 31
     @hapic.handle_exception(UserDoesNotExist, HTTPStatus.NOT_FOUND)

+ 11 - 11
tracim/views/core_api/workspace_controller.py View File

@@ -34,12 +34,12 @@ from tracim.views.core_api.schemas import WorkspaceMemberSchema
34 34
 from tracim.models.contents import ContentTypeLegacy as ContentType
35 35
 from tracim.models.revision_protection import new_revision
36 36
 
37
-WORKSPACES_ENDPOINTS_TAG = 'Workspaces'
37
+WORKSPACE_ENDPOINTS_TAG = 'Workspaces'
38 38
 
39 39
 
40 40
 class WorkspaceController(Controller):
41 41
 
42
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
42
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
43 43
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
44 44
     @hapic.handle_exception(InsufficientUserWorkspaceRole, HTTPStatus.FORBIDDEN)
45 45
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -59,7 +59,7 @@ class WorkspaceController(Controller):
59 59
         )
60 60
         return wapi.get_workspace_with_context(request.current_workspace)
61 61
 
62
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
62
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
63 63
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
64 64
     @hapic.handle_exception(InsufficientUserWorkspaceRole, HTTPStatus.FORBIDDEN)
65 65
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -88,7 +88,7 @@ class WorkspaceController(Controller):
88 88
             for user_role in roles
89 89
         ]
90 90
 
91
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
91
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
92 92
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
93 93
     @hapic.handle_exception(InsufficientUserWorkspaceRole, HTTPStatus.FORBIDDEN)
94 94
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -124,7 +124,7 @@ class WorkspaceController(Controller):
124 124
         ]
125 125
         return contents
126 126
 
127
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
127
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
128 128
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
129 129
     @hapic.handle_exception(InsufficientUserWorkspaceRole, HTTPStatus.FORBIDDEN)
130 130
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -157,7 +157,7 @@ class WorkspaceController(Controller):
157 157
         content = api.get_content_in_context(content)
158 158
         return content
159 159
 
160
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
160
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
161 161
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
162 162
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
163 163
     @hapic.handle_exception(InsufficientUserWorkspaceRole, HTTPStatus.FORBIDDEN)
@@ -166,7 +166,7 @@ class WorkspaceController(Controller):
166 166
     @require_candidate_workspace_role(UserRoleInWorkspace.CONTENT_MANAGER)
167 167
     @hapic.input_path(WorkspaceAndContentIdPathSchema())
168 168
     @hapic.input_body(ContentMoveSchema())
169
-    @hapic.output_body(ContentDigestSchema())  # nopep8
169
+    @hapic.output_body(ContentDigestSchema())
170 170
     def move_content(
171 171
             self,
172 172
             context,
@@ -212,7 +212,7 @@ class WorkspaceController(Controller):
212 212
         )
213 213
         return api.get_content_in_context(updated_content)
214 214
 
215
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
215
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
216 216
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
217 217
     @hapic.handle_exception(InsufficientUserWorkspaceRole, HTTPStatus.FORBIDDEN)
218 218
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -247,7 +247,7 @@ class WorkspaceController(Controller):
247 247
             api.delete(content)
248 248
         return
249 249
 
250
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
250
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
251 251
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
252 252
     @hapic.handle_exception(InsufficientUserWorkspaceRole, HTTPStatus.FORBIDDEN)
253 253
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -283,7 +283,7 @@ class WorkspaceController(Controller):
283 283
             api.undelete(content)
284 284
         return
285 285
 
286
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
286
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
287 287
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
288 288
     @hapic.handle_exception(InsufficientUserWorkspaceRole, HTTPStatus.FORBIDDEN)
289 289
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -315,7 +315,7 @@ class WorkspaceController(Controller):
315 315
             api.archive(content)
316 316
         return
317 317
 
318
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
318
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
319 319
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
320 320
     @hapic.handle_exception(InsufficientUserWorkspaceRole, HTTPStatus.FORBIDDEN)
321 321
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)