Created
August 14, 2019 20:52
-
-
Save harshvb7/18d9e843dc7ca82e80c19b1416929674 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tests/views/test_project_detail_view.py | |
tests/views/..... | |
>> Views must ONLY test input and status code of the response. Mock the business logic to test the status code. | |
Ideally our views should be very SLIM and all the logic must go in services and helper functions | |
If we need to access some variables from request in the service, then better destructure it in the view and pass ONLY the variable in the service NEVER the request object. | |
In case of API view, call the service from the serializer after validating the input. Don't come back to the view with the validated input and then put the input again in the service. | |
tests/services/test_document_service.py | |
tests/models/..* | |
tests/forms/..* YEP FORMS!!!! | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment