docs(development): Update test suit locations

ref: #780 #729
This commit is contained in:
2025-05-31 07:45:10 +09:30
parent 56bb1863f2
commit 2f22d0f135
2 changed files with 19 additions and 14 deletions

View File

@ -266,22 +266,28 @@ Adding [History](./core/model_history.md) to a model is automatic. If there is a
## Tests
The following Unit test cases exists for models:
The following Unit test suites exists for models:
- Unit Tests
- `app.tests.unit.test_unit_models.TenancyObjectInheritedCases` for models that inherit from `access.models.tenancy.TenancyObject`
- model (Base Model) `core.tests.unit.centurion_abstract.test_unit_centurion_abstract_model.CenturionAbstractModelInheritedCases`
- model (Sub-Model) `core.tests.unit.centurion_sub_abstract.test_unit_centurion_sub_abstract_model.CenturionSubAbstractModelInheritedCases`
- `app.tests.unit.test_unit_models.NonTenancyObjectInheritedCases` for models other models that **do not** inherit from `access.models.tenancy.TenancyObject`
- Functional Tests
- `api.tests.functional.test_functional_api_permissions.<permission type>InheriredCases` API Permission Tests.
- model `core.tests.functional.centurion_abstract.test_functional_centurion_abstract_model.CenturionAbstractModelInheritedCases`
- API Fields Render `api.tests.functional.test_functional_api_fields.APIFieldsInheritedCases`
- API Permissions `api.tests.functional.test_functional_api_permissions.<permission type>InheriredCases`
Generally Test Cases from class `APIPermissionsInheritedCases` will be used as it covers the standard Django Permissions, `add`, `change`, `delete` and `view`.
!!! info
If you add a feature you will have to write the test cases for that feature if they are not covered by existing test cases.
If you add a feature you will have to [write the test cases](./testing.md) for that feature if they are not covered by existing test cases.
## Knowledge Base Article linking

View File

@ -35,7 +35,11 @@ example file system structure showing the layout of the tests directory for a mo
│   ├── functional
│   │ ├── __init__.py
│   │   └── <model name>
│   │   ── test_<type>_<model name>_<component name>.py
│     ── test_functional_<model name>_api_fields.py
│      ├── test_functional_<model name>_api_permission.py
│      ├── test_functional_<model name>_api_metadata.py
│      ├── test_functional_<model name>_model.py
│   │   └── test_functional_<model name>_serializer.py
│   ├── __init__.py
│   ├── integration
│   │ ├── __init__.py
@ -48,14 +52,9 @@ example file system structure showing the layout of the tests directory for a mo
│   └── unit
│   ├── __init__.py
│   └── <model name>
│      ├── test_<type>_<model name>.py
│      ├── test_<type>_<model name>__api.py
│      ── test_<type>_<model name>_history.py
│      ├── test_<type>_<model name>_history_permission.py
│      ├── test_<type>_<model name>_notes.py
│      ├── test_<type>_<model name>_permission_api.py
│      ├── test_<type>_<model name>_serializer.py
│      └── test_<type>_<model name>_viewsets.py
│      ├── test_unit_<model name>_model.py
│      ├── test_unit_<model name>_serializer.py
│      ── test_unit_<model name>_viewset.py
```