nofusscomputing / nofusscomputing/centurion_erp

Organization and Permission Mixin test case refactor

Open
#698 0 comments 0 reactions 1 assignee View on GitHub

@jon-nfc is already working on this.

Since Aug 20, 2025.

task::test type::task
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: Add OrganizationMixin test suit as part of test class CommonViewSetCases

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 OrganizationMixin test cases to be similar in design to the new viewset test classes
  • Refactor PermissionMixin test 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.py the inherited test cases for perms and organization mixins

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.