Skip to content

Refactor/request type consistency - #60

Merged
Cteklitz merged 75 commits into
mainfrom
refactor/request-type-consistency
Mar 31, 2026
Merged

Refactor/request type consistency#60
Cteklitz merged 75 commits into
mainfrom
refactor/request-type-consistency

Conversation

@Cteklitz

@Cteklitz Cteklitz commented Mar 11, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

Change backend endpoints to align with RESTful and project requirements.

Related Issue(s)

#57 #61 #66 #67

PR Type (Check all that apply)

  • Major Feature
  • Minor Feature / Enhancement
  • Bug Fix
  • Documentation Update
  • Refactor / Technical Debt
  • CI/CD Changes

Checklist

Make sure that the following steps are completed before requesting a review.

  • All existing tests pass locally.
  • Any new features have tests.
  • Code follows the style standards.
  • Code passes all formatting/linting checks.

Additional Notes

Add any relevant information for reviewers here.

@Cteklitz
Cteklitz marked this pull request as ready for review March 11, 2026 19:29
@Cteklitz
Cteklitz requested a review from kinneyan as a code owner March 11, 2026 19:29
Comment thread server/api/views/workspace.py Outdated
Comment thread server/api/tests/unit/views/test_role_views.py
@Cteklitz
Cteklitz force-pushed the refactor/request-type-consistency branch from 8e2d2f6 to ad478f8 Compare March 17, 2026 20:38
Cteklitz and others added 10 commits March 17, 2026 16:49
Remove implementation-testing unit tests (mocked view tests, serializer
field introspection, Meta attribute assertions) that provide no real
signal and duplicate integration test coverage.

Fix assertTrue(False/True) anti-patterns across integration tests,
replacing them with assertFalse/assertTrue(Model.objects.filter(...).exists()).

Add cross-workspace isolation tests for all resource-level endpoints
(role CRUD, shift CRUD, member roles, permissions), verifying that a
privileged member of workspace B cannot operate on resources in workspace A.

Fix bug in MemberPermissionsView where WorkspaceMember.DoesNotExist was
unhandled when the requester had no membership in the target workspace,
causing a 500 instead of 403.
test: overhaul test suite for quality and coverage
@Cteklitz
Cteklitz force-pushed the refactor/request-type-consistency branch from 332eb61 to a879a24 Compare March 18, 2026 19:37
@Cteklitz
Cteklitz marked this pull request as ready for review March 23, 2026 19:50
@Cteklitz
Cteklitz requested a review from kinneyan March 26, 2026 16:49

@kinneyan kinneyan left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple comments that I must have missed before. After these 4 will approve. Sorry.

Comment thread server/api/views/user.py Outdated
Comment thread server/api/views/shift.py Outdated
Comment thread server/api/views/member.py Outdated
Comment thread server/api/views/workspace.py
@kinneyan

Copy link
Copy Markdown
Owner

To resolve the conflicts you'll probably need to manually change the line number fixes that I did and then run black to make it do that and then can pull main in. Lmk if you need help.

@Cteklitz
Cteklitz requested a review from kinneyan March 30, 2026 18:41
@kinneyan

Copy link
Copy Markdown
Owner

Don't forget to close out those tickets after merging.

@Cteklitz
Cteklitz merged commit 4b7beb9 into main Mar 31, 2026
5 checks passed
@Cteklitz
Cteklitz deleted the refactor/request-type-consistency branch March 31, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants