integration tests for https://github.com/uc-cdis/guppy/pull/331#537
integration tests for https://github.com/uc-cdis/guppy/pull/331#537grugna wants to merge 8 commits into
Conversation
|
I am not sure what is the data loaded for the query, so we'll need to update the expected responses. |
| queryFile = "test_query9.json" | ||
| responseFile = "test_response9.json" | ||
| queryType = "data" | ||
| assert guppy.validate_guppy_query( |
There was a problem hiding this comment.
This test is failing with
actualResponse = [{'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, ...]
expectedResponse = [{'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, ...]
def match_data_query(self, actualResponse, expectedResponse):
""" "
Function to validate API Call output against responseFile
for Download/Default query type
"""
> assert len(actualResponse) == len(expectedResponse)
E AssertionError
services/guppy.py:158: AssertionError
And I'm still trying to figure out why, because the number of entries in the test file seems right to me 🤔
There was a problem hiding this comment.
It looks like the query is only going to return the first 10 result from Guppy because the first argument is missing and 10 would be its default value https://github.com/uc-cdis/guppy/blob/master/doc/queries.md?plain=1#L134
There was a problem hiding this comment.
I suspect that would also be true for other test cases we added in here
There was a problem hiding this comment.
@mfshao ok, I updated that. Let me know if you see any other errors or we are good to merge this and the guppy one.
Co-authored-by: Mingfei Shao <2475897+mfshao@users.noreply.github.com>
Co-authored-by: Mingfei Shao <2475897+mfshao@users.noreply.github.com>
Link to JIRA ticket if there is one:
New Features
Breaking Changes
Bug Fixes
Improvements
Dependency updates
Deployment changes