|
@@ -94,7 +94,7 @@ class TestCommentsEndpoint(FunctionalTest):
|
94
|
94
|
assert len(res.json_body) == 4
|
95
|
95
|
assert comment == res.json_body[3]
|
96
|
96
|
|
97
|
|
- def test_api__delete_content_comment__ok_200__workspace_manager_owner(self) -> None:
|
|
97
|
+ def test_api__delete_content_comment__ok_200__user_is_owner_and_workspace_manager(self) -> None: # nopep8
|
98
|
98
|
"""
|
99
|
99
|
delete comment (user is workspace_manager and owner)
|
100
|
100
|
"""
|
|
@@ -127,7 +127,7 @@ class TestCommentsEndpoint(FunctionalTest):
|
127
|
127
|
assert len(res.json_body) == 2
|
128
|
128
|
assert not [content for content in res.json_body if content['content_id'] == 18] # nopep8
|
129
|
129
|
|
130
|
|
- def test_api__delete_content_comment__ok_200__workspace_manager(self) -> None:
|
|
130
|
+ def test_api__delete_content_comment__ok_200__user_is_workspace_manager(self) -> None: # nopep8
|
131
|
131
|
"""
|
132
|
132
|
delete comment (user is workspace_manager)
|
133
|
133
|
"""
|
|
@@ -160,7 +160,7 @@ class TestCommentsEndpoint(FunctionalTest):
|
160
|
160
|
assert len(res.json_body) == 2
|
161
|
161
|
assert not [content for content in res.json_body if content['content_id'] == 19] # nopep8
|
162
|
162
|
|
163
|
|
- def test_api__delete_content_comment__ok_200__content_manager_owner(self) -> None:
|
|
163
|
+ def test_api__delete_content_comment__ok_200__user_is_owner_and_content_manager(self) -> None: # nopep8
|
164
|
164
|
"""
|
165
|
165
|
delete comment (user is content-manager and owner)
|
166
|
166
|
"""
|
|
@@ -193,7 +193,7 @@ class TestCommentsEndpoint(FunctionalTest):
|
193
|
193
|
assert len(res.json_body) == 2
|
194
|
194
|
assert not [content for content in res.json_body if content['content_id'] == 19] # nopep8
|
195
|
195
|
|
196
|
|
- def test_api__delete_content_comment__err_403__content_manager(self) -> None:
|
|
196
|
+ def test_api__delete_content_comment__err_403__user_is_content_manager(self) -> None: # nopep8
|
197
|
197
|
"""
|
198
|
198
|
delete comment (user is content-manager)
|
199
|
199
|
"""
|
|
@@ -204,7 +204,7 @@ class TestCommentsEndpoint(FunctionalTest):
|
204
|
204
|
'foobarbaz'
|
205
|
205
|
)
|
206
|
206
|
)
|
207
|
|
- res = self.testapp.get('/api/v2/workspaces/2/contents/7/comments', status=200)
|
|
207
|
+ res = self.testapp.get('/api/v2/workspaces/2/contents/7/comments', status=200) # nopep8
|
208
|
208
|
assert len(res.json_body) == 3
|
209
|
209
|
comment = res.json_body[2]
|
210
|
210
|
assert comment['content_id'] == 20
|
|
@@ -223,7 +223,7 @@ class TestCommentsEndpoint(FunctionalTest):
|
223
|
223
|
status=403
|
224
|
224
|
)
|
225
|
225
|
|
226
|
|
- def test_api__delete_content_comment__err_403__reader_owner(self) -> None:
|
|
226
|
+ def test_api__delete_content_comment__err_403__user_is_owner_and_reader(self) -> None:
|
227
|
227
|
"""
|
228
|
228
|
delete comment (user is reader and owner)
|
229
|
229
|
"""
|
|
@@ -253,7 +253,7 @@ class TestCommentsEndpoint(FunctionalTest):
|
253
|
253
|
status=403
|
254
|
254
|
)
|
255
|
255
|
|
256
|
|
- def test_api__delete_content_comment__err_403__reader(self) -> None:
|
|
256
|
+ def test_api__delete_content_comment__err_403__user_is_reader(self) -> None:
|
257
|
257
|
"""
|
258
|
258
|
delete comment (user is reader)
|
259
|
259
|
"""
|