@ -8,6 +8,8 @@ about: https://gitlab.com/nofusscomputing/infrastructure/configuration-managemen
|
||||
|
||||
Models are tested using the following test cases:
|
||||
|
||||
- [Models](./models.md)
|
||||
|
||||
- [ALL Model Permission](./model_permissions.md)
|
||||
|
||||
- [ALL Model Permission (organization Manager)](./model_permissions_organization_manager.md)
|
||||
|
27
docs/projects/centurion_erp/development/api/tests/models.md
Normal file
27
docs/projects/centurion_erp/development/api/tests/models.md
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
title: Model Test Cases
|
||||
description: No Fuss Computings model nit test cases
|
||||
date: 2024-07-15
|
||||
template: project.html
|
||||
about: https://gitlab.com/nofusscomputing/infrastructure/configuration-management/centurion_erp
|
||||
---
|
||||
|
||||
|
||||
## Base Unit Tests for all models
|
||||
|
||||
Abstract test class containing test cases for all models.
|
||||
|
||||
::: app.app.tests.abstract.models.BaseModel
|
||||
options:
|
||||
inherited_members: false
|
||||
heading_level: 3
|
||||
|
||||
|
||||
## Tenancy model Unit Tests
|
||||
|
||||
Abstract test class containing test cases for Tenancy Object models
|
||||
|
||||
::: app.app.tests.abstract.models.TenancyModel
|
||||
options:
|
||||
inherited_members: True
|
||||
heading_level: 3
|
@ -34,6 +34,18 @@ All models must meet the following requirements:
|
||||
- No `queryset` is to return data that the user has not got access to. _see [queryset()](./api/models/tenancy_object.md#tenancy-object-manager)_
|
||||
|
||||
|
||||
## Tests
|
||||
|
||||
The following Unit test cases exists for models:
|
||||
|
||||
- [BaseModel](./api/tests/models.md#base-unit-tests-for-all-models)
|
||||
|
||||
- [TenancyObject](./api/tests/models.md#tenancy-model-unit-tests)
|
||||
|
||||
!!! 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.
|
||||
|
||||
|
||||
## Docs to clean up
|
||||
|
||||
!!! note
|
||||
|
@ -50,6 +50,26 @@ All views are to meet the following requirements:
|
||||
- Add and change views to use a form class
|
||||
|
||||
|
||||
## Tests
|
||||
|
||||
The following unit test cases exist for views:
|
||||
|
||||
- [AddView](./api/tests/model_views.md#add-view)
|
||||
|
||||
- [ChangeView](./api/tests/model_views.md#change-view)
|
||||
|
||||
- [DeleteView](./api/tests/model_views.md#delete-view)
|
||||
|
||||
- [Display View](./api/tests/model_views.md#display-view)
|
||||
|
||||
- [IndexView](./api/tests/model_views.md#index-view)
|
||||
|
||||
- [AllViews](./api/tests/model_views.md#all-views)
|
||||
|
||||
!!! tip
|
||||
The `AllViews` test class is an aggregation of all views. This class is the recommended test class to include if the model uses all available views.
|
||||
|
||||
|
||||
## Docs to clean up
|
||||
|
||||
!!! note
|
||||
|
Reference in New Issue
Block a user