Team-uMigrate / umigrate

Source code for the uMigrate project
13 stars 2 forks source link

Back-end unit testing #460

Closed deandrebaker closed 3 years ago

deandrebaker commented 3 years ago

We have integration tests for most of our basic API endpoints. However, many of these tests are redundant since most basic API endpoints behave similarly (they inherit from the same parent class and have the same logic).

We aren't unit testing any custom logic in our code. We should add unit tests for classes and functions that have logic we wrote.

We may need to use dependency injection in some scenarios to make it easier to mock dependencies (such as notification helpers).

deandrebaker commented 3 years ago

Abstract API Views

Abstract models

Abstract serializers

Decorators

Model extensions

Notification helpers

Seriazlier extentions

Event models

Event serializers

Messaging API views

Messaging models

Messaging receiver

Messaging serializers

Notification API views

Photo models

Users models

User serializers

Registration views

deandrebaker commented 3 years ago

https://docs.djangoproject.com/en/3.2/topics/testing/overview/