Skip to content

Commit 228bdf7

Browse files
committed
✅(backend) fix wrong docstrings in tests for favorite documents
This was most likely due to copy pasta fail.
1 parent bbf48f0 commit 228bdf7

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/backend/core/tests/documents/test_api_documents_favorite.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ def test_api_document_favorite_anonymous_user(method, reach):
4545
],
4646
)
4747
def test_api_document_favorite_authenticated_post_allowed(reach, has_role):
48-
"""Authenticated users should be able to mark a document as favorite using POST."""
48+
"""
49+
Authenticated users should be able to mark a document to which they have access
50+
as favorite using POST.
51+
"""
4952
user = factories.UserFactory()
5053
document = factories.DocumentFactory(link_reach=reach)
5154
client = APIClient()
@@ -69,7 +72,10 @@ def test_api_document_favorite_authenticated_post_allowed(reach, has_role):
6972

7073

7174
def test_api_document_favorite_authenticated_post_forbidden():
72-
"""Authenticated users should be able to mark a document as favorite using POST."""
75+
"""
76+
Authenticated users should not be allowed to mark a document to which they don't
77+
have access as favorite using POST.
78+
"""
7379
user = factories.UserFactory()
7480
document = factories.DocumentFactory(link_reach="restricted")
7581
client = APIClient()

src/backend/core/tests/documents/test_api_documents_favorite_list.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def test_api_document_favorite_list_authenticated_with_favorite():
4141
client = APIClient()
4242
client.force_login(user)
4343

44-
# User don't have access to this document, let say it had access and this access has been
45-
# removed. It should not be in the favorite list anymore.
44+
# User don't have access to this document (e.g the user had access and this
45+
# access was removed. It should not be in the favorite list anymore.
4646
factories.DocumentFactory(favorited_by=[user])
4747

4848
document = factories.UserDocumentAccessFactory(

0 commit comments

Comments
 (0)