micromasters icon indicating copy to clipboard operation
micromasters copied to clipboard

Refactor Enrollment/Certificate models and tests

Open gsidebo opened this issue 7 years ago • 0 comments

#711 introduced the CachedEnrollment and CachedCertificate to our codebase to provide a way for us to cache edx data in our own database. The model definitions are identical, the get_ functions to retrieve their data in dashboard/api.py are very similar, and the test cases for these models in dashboard/api_test.py are also very similar. We should be able to abstract a lot of this logic into a parent class that both models inherit from and eliminate this repetition.

UPDATE: PR #720 introduces Factory classes for these two models and some api test cases. Those should also be part of this refactor

gsidebo avatar Jul 21 '16 15:07 gsidebo