-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce code redundancy in backend testing #4829
Comments
Hi @giritheja -- do you think you could include a list of files with testapp.get() etc. references that need to be changed? Just wanted to get a sense of how many there are -- hopefully it's small and not really widespread. Thanks! |
Should I take this issue? |
Sure, go ahead! Feel free to assign yourself if you'd like to take it up. |
@seanlip just a question. There are many instances of |
That's a good question. I think we should define a self.get_html() for parity with self.get_json(), and then use either of these as appropriate. What do you think? |
Yes I agree |
Hi @lilithxxx any updates on this issue? |
@nithusha21 I will surely get into this next week as currently I am travelling |
@lilithxxx, any update on this? |
@DubeySandeep working on this |
* Replaced testapp.get with appropriate functions * Add test cases * Function get_response * Function get_response_without_checking_for_errors * Fixed Errors * Fixed lint checks * removed further redundancy * Lint checks * Lint checks * made params only dict type * Minor changes
In the codebase, the methods
get_json
andtestapp.get
are used for the same purpose. In the following screenshot of editor_test.py,get_json
is used to verify the successful case (response status = 200) andtestapp.get
is used to verify the error case (response status != 200)The goal of this issue is to replace
testapp.get
method in all the_test
files withget_json
method.Reference: #4574
The text was updated successfully, but these errors were encountered: