Eliminate Code Smells and Duplications on Backend Codes - 2nd Iteration (1606895606 - #83)
This is another refactor iteration that I commenced, because previously I'm mostly refactoring tests, where it's no longer being considered for group score. Yes, I want to contribute on things that being considered for our group score.
Now, I reduced code smells on vacancies.py
, regarding "cognitive complexity" and "duplication" on create
and partial_update
method on VacancyViewSet. I extracted those long methods into a better one to read (hopefully).
I also modified some problemmatic (old) tests. I think we must validate names when updating Vacancy objects because we validate it when creating them. Unfortunately, some of the tests are problemmatic: using non-alphabetic characters (numbers, punctuations).
This merge request closes #83 (closed), as I'm pretty sure there's no more code smell issues on backend codes.