-
Notifications
You must be signed in to change notification settings - Fork 130
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
Adapt and modify tests #299
Conversation
…n be tested effecively
It would be good if you could also try and run this test for another API documentation, other than the dummy one created in the sample. Maybe try for the flock-demo documentation and see if all tests pass. |
2 tests are failing because I am assuming if an endpoint class has POST or DELETE or GET method it must have a PUT method, so I am using put(directly without checking if class supports PUT operation) to add a new object before testing for GET, POST and DELETE.
|
it is not mandatory for any endpoint to have other methods beside the ones it declares in the doc. So the test should be fixed to test only the methods allowed by the endpoint, the others should return |
in the context of a unit test, every test case should be absolutely independent from other tests. So in this case, and any similar cases, we should insert the item using the ORM and then test only the
Even better: the item creation should be in the class' |
Yes now tests are passing for flock-demo doc. Thanks! |
hydrus/samples/doc_writer_sample.py
Outdated
@@ -58,17 +71,46 @@ | |||
op_returns, | |||
op_status) | |||
|
|||
|
|||
"""Add the operation to the Class""" | |||
"""Same way add DELETE, PUT and GET operations""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vddesai1871 Looks good! Could you please replace the """
with simple comments.
I don't think I can do anything about this. It is related to pyyaml's compatibility with pythin 3.7 they are woking on it |
Fixes #296
Checklist
Description
Adapts the tests in test_app.py to recent changes.
Test Logs
Changes log
Debugs various errors mentioned in #296
Added
Changed
Fixed
Removed