mirror of
https://github.com/HackSoftware/Django-Styleguide.git
synced 2024-11-11 04:06:46 +03:00
Highlight important rules of thumb
This commit is contained in:
parent
ce05847710
commit
7886bfa432
|
@ -470,9 +470,9 @@ Since services hold our business logic, they are an ideal candidate for tests.
|
|||
|
||||
If you decide to cover the service layer with tests, we have few general rules of thumb to follow:
|
||||
|
||||
1. The tests should cover the business logic behind the services in an exhaustive manner.
|
||||
1. The tests should hit the database - creating & reading from it.
|
||||
1. The tests should mock async task calls & everything that goes outside the project.
|
||||
1. The tests **should cover the business logic** in an exhaustive manner.
|
||||
1. The tests **should hit the database** - creating & reading from it.
|
||||
1. The tests **should mock async task calls & everything that goes outside the project.**
|
||||
|
||||
When creating the required state for a given test, one can use a combination of:
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user