Skip to content

Commit

Permalink
👕 #123: - build: run linters
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvandescheur committed Jun 18, 2024
1 parent ddbdd08 commit ece6101
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 1 addition & 3 deletions backend/src/openarchiefbeheer/accounts/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ def get_queryset(self) -> QuerySet[User]:

@extend_schema(
summary=_("Who Am I"),
description=_(
"Returns the current logged in user."
),
description=_("Returns the current logged in user."),
responses={
200: UserSerializer(),
},
Expand Down
10 changes: 7 additions & 3 deletions backend/src/openarchiefbeheer/accounts/tests/test_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from rest_framework.reverse import reverse
from rest_framework.test import APITestCase

from openarchiefbeheer.accounts.tests.factories import UserFactory, RoleFactory
from openarchiefbeheer.accounts.tests.factories import RoleFactory, UserFactory


class WhoAmIViewTest(APITestCase):
Expand Down Expand Up @@ -31,8 +31,12 @@ def test_authenticated(self):
self.assertEqual(data["lastName"], user.last_name)
self.assertEqual(data["email"], user.email)
self.assertEqual(data["role"]["name"], role.name)
self.assertEqual(data["role"]["canStartDestruction"], role.can_start_destruction)
self.assertEqual(data["role"]["canReviewDestruction"], role.can_review_destruction)
self.assertEqual(
data["role"]["canStartDestruction"], role.can_start_destruction
)
self.assertEqual(
data["role"]["canReviewDestruction"], role.can_review_destruction
)
self.assertEqual(data["role"]["canViewCaseDetails"], role.can_view_case_details)

def test_post(self):
Expand Down

0 comments on commit ece6101

Please sign in to comment.