nofusscomputing / nofusscomputing/centurion_erp
Organization and Permission Mixin test case refactor
@jon-nfc is already working on this.
Since Aug 20, 2025.
- Dominant language
- Python
- Stars
- 1
- Forks
- 1
- Avg merge
- 2h 18m
- Merged PRs (30d)
- 8
Description
ViewSet Test Cases were written and refactored in https://github.com/nofusscomputing/centurion_erp/issues/672. during work on this it was discovered that some objects were not tested. Although #697 is covering the missing tests, the OrganizationMixin and PermissionMixin from the access module need to be added to the new ViewSet test classes.
Details
- ref code line
# OrganizationMixinTest, # ToDo: AddOrganizationMixintest suitas part of test classCommonViewSetCases
The mixin test cases need to be added to the viewset test cases so that ALL viewset tests for every viewset are together and based off of the created viewset.
The test case redesign is so that the test cases are structured the same way as the applications classes. i.e. the same inheritence with test suite names being <inherited class name>TestCases for test cases and <inherited class name>Test for tests with <inherited class name>InheritedCases being the test case class name for sub-test cases to uses for their own tests
Tasks
- Refactor
OrganizationMixintest cases to be similar in design to the new viewset test classes - Refactor
PermissionMixintest cases to be similar in design to the new viewset test classes - Add to the test cases in
app/api/tests/unit/test_unit_common_viewset.pythe inherited test cases for perms and organization mixins
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.