Mentorship-backend: refactor: Remove `.value` from the HTTPStatus in tests directory

Created on 20 Feb 2021  路  6Comments  路  Source: anitab-org/mentorship-backend

Description

The test directory contains several instances where .value is added to HTTPStatus unnecessarily. One of the instance is:-
https://github.com/anitab-org/mentorship-backend/blob/df8e4a4a3c167f01750ded0c4a89fc5a3ab0b32d/tests/task_comments/test_api_delete_task_comment.py#L38

Here, .value can be removed as both enum and int representations of status codes are equal when asserted.

Test Cases

You can check the following document for test cases:

Definition of Done

  • [ ] All instances of .value are removed from the tests directory.
  • [ ] Approval by 1 mentor.

Estimation

2 hours

Quality Assurance First Timers Only Maintenance

All 6 comments

I would like to work on this issue

@devkapilbansal since this is maintenance and not a new feature I think it can be assigned.

@Ishaandham19 assigning you. Happy coding.

Since this is my first commit, I want to get some feedback on the process I will take to solve this issue
1) Fork -> clone -> branch -> "change code" - > push -> pull request
2) For the "change code": I would be going through all the .py files in the "tests" directory and changing instances of .value added to HTTPStatus in the assertEqual method

Since this is my first commit, I want to get some feedback on the process I will take to solve this issue

  1. Fork -> clone -> branch -> "change code" - > push -> pull request
  2. For the "change code": I would be going through all the .py files in the "tests" directory and changing instances of .value added to HTTPStatus in the assertEqual method

Yes somewhat like that. Although you missed a few steps. You can go through the Readme for the setup process.
If you do face any problems feel free to ask here or on Zulip. : )

This is my first commit, I read the issue but somewhat I understood. So can someone help me out what is the issue.
Thank you

Was this page helpful?
0 / 5 - 0 ratings