Add crud test for nested objects#399
Merged
Mec-iS merged 1 commit intoHTTP-APIs:developfrom Jun 6, 2019
Merged
Conversation
chrizandr
reviewed
Jun 5, 2019
| self.doc_collection_classes), self.doc) | ||
| id_ = "1" | ||
| id_ = str(uuid.uuid4()) | ||
| insert_response = crud.insert( |
Member
There was a problem hiding this comment.
Why this insert out of the try catch block?
Contributor
Author
There was a problem hiding this comment.
The first insert is a normal insert with a unique ID and the other one in the try block is redundant (using already used id, which is supposed to fail).
Contributor
Author
There was a problem hiding this comment.
I have also changed the name of this test to make it more clear.
Member
|
@chrizandr is it okay to merge? |
Mec-iS
added a commit
that referenced
this pull request
Jul 7, 2019
* Extend collection test to validate member item URI (#398) * Adding DELETE operation to drone collection * English typos * Maintaining examples synchronized * Add crud test for nested objects and refactor other tests (#399) * Use HydraStatus and HydraError to return status response * Add a helper function to apply filtering. * Add helper function to create IriTemplates. * Use iri_template generator and attach generated iri_template to the colection response. * Implement searching * Add support for pagination of search results. * Add function to include mappings for properties of nested classes in IriTemplate * Add support for search over nested property values * Add tests for IriTemplates generated by hydrus. * Add test for searching mechanism(get_collection()) * Refactor by adding functions for parameter parsing and calculating page limit and offset * Refactor code by removing redundant check based on value of path variable * Add exception handling for invalid parameters
chrizandr
pushed a commit
that referenced
this pull request
Jul 19, 2019
* Extend collection test to validate member item URI (#398) * Adding DELETE operation to drone collection * English typos * Maintaining examples synchronized * Add crud test for nested objects and refactor other tests (#399) * Use HydraStatus and HydraError to return status response * Add a helper function to apply filtering. * Add helper function to create IriTemplates. * Use iri_template generator and attach generated iri_template to the colection response. * Implement searching * Add support for pagination of search results. * Add function to include mappings for properties of nested classes in IriTemplate * Add support for search over nested property values * Add tests for IriTemplates generated by hydrus. * Add test for searching mechanism(get_collection()) * Refactor by adding functions for parameter parsing and calculating page limit and offset * Refactor code by removing redundant check based on value of path variable * Add exception handling for invalid parameters * Add mechanism to support client-controlled pagination (#409) * Add helper function to attach pagination related mappings to the IriTemplate * Add an exception to handle incomaptible parameters * Add mechanism to handle client-guided pagination * Refactor code and add exception for out of range offset value. * Add tests for client controlled pagination. * Debug test_pep8.py and make codebase pep8 compatible. * Update hydrus with latest changes made at core (#411) * Update hydrus to use updated core and adapt code accordingly. * Update tests and add test for readable properties. * Bump version to 0.2.6
chrizandr
added a commit
that referenced
this pull request
Aug 16, 2019
* Extend collection test to validate member item URI (#398) * Adding DELETE operation to drone collection * English typos * Maintaining examples synchronized * Add crud test for nested objects and refactor other tests (#399) * Use HydraStatus and HydraError to return status response * Add a helper function to apply filtering. * Add helper function to create IriTemplates. * Use iri_template generator and attach generated iri_template to the colection response. * Implement searching * Add support for pagination of search results. * Add function to include mappings for properties of nested classes in IriTemplate * Add support for search over nested property values * Add tests for IriTemplates generated by hydrus. * Add test for searching mechanism(get_collection()) * Refactor by adding functions for parameter parsing and calculating page limit and offset * Refactor code by removing redundant check based on value of path variable * Add exception handling for invalid parameters * Add mechanism to support client-controlled pagination (#409) * Add helper function to attach pagination related mappings to the IriTemplate * Add an exception to handle incomaptible parameters * Add mechanism to handle client-guided pagination * Refactor code and add exception for out of range offset value. * Add tests for client controlled pagination. * Debug test_pep8.py and make codebase pep8 compatible. * Update hydrus with latest changes made at core (#411) * Update hydrus to use updated core and adapt code accordingly. * Update tests and add test for readable properties. * Bump version to 0.2.6 * Refactor crud.insert and create new file for other helper functions. * Add basic socket connection functionality to hydrus. * Add socketio update event for synchronization. * Add an endpoint for modification-table-diff. * Refactor some code and add inline comments. * Rename new_job_id field in response to job_id. * Add support to propagate multiple_delete modifications. * Add sync functionality for PUT and refactor code. * Add a thread to do routine cleanup of modification records. * Refactor 'modification-table endpoint' code. * Add tests for sync updates and modification-table. * Send an empty response with status-code 204 for outdated clients. * Use socketio event to send modification-table-diff. * Add reconnect event and extend tests. * Refactor and add comments. * Remove uuid and timestamp, and use incremental ids instead. * Use incremental job_id instead of timestamp to clean stale records. * Remove unused imports. * Use HydraLink to improve handling of nested object props. * Add links as GraphIII triples instead of GraphIIT triples. * Add link_prop to assist insertion of linked properties as GraphIII. * Adapt test for nested fields defined with hydra:Link. * Refactor insertion of GraphIII triples for link properties. * Add explicit type check for link properties. * Use latest hydra-python-core from the master branch.
xadahiya
added a commit
that referenced
this pull request
Aug 16, 2019
* Extend collection test to validate member item URI (#398) * Adding DELETE operation to drone collection * English typos * Maintaining examples synchronized * Add crud test for nested objects and refactor other tests (#399) * Use HydraStatus and HydraError to return status response * Add a helper function to apply filtering. * Add helper function to create IriTemplates. * Use iri_template generator and attach generated iri_template to the colection response. * Implement searching * Add support for pagination of search results. * Add function to include mappings for properties of nested classes in IriTemplate * Add support for search over nested property values * Add tests for IriTemplates generated by hydrus. * Add test for searching mechanism(get_collection()) * Refactor by adding functions for parameter parsing and calculating page limit and offset * Refactor code by removing redundant check based on value of path variable * Add exception handling for invalid parameters * Add mechanism to support client-controlled pagination (#409) * Add helper function to attach pagination related mappings to the IriTemplate * Add an exception to handle incomaptible parameters * Add mechanism to handle client-guided pagination * Refactor code and add exception for out of range offset value. * Add tests for client controlled pagination. * Debug test_pep8.py and make codebase pep8 compatible. * Update hydrus with latest changes made at core (#411) * Update hydrus to use updated core and adapt code accordingly. * Update tests and add test for readable properties. * Bump version to 0.2.6 * Refactor crud.insert and create new file for other helper functions. * Add basic socket connection functionality to hydrus. * Add socketio update event for synchronization. * Add an endpoint for modification-table-diff. * Refactor some code and add inline comments. * Rename new_job_id field in response to job_id. * Add support to propagate multiple_delete modifications. * Add sync functionality for PUT and refactor code. * Add a thread to do routine cleanup of modification records. * Refactor 'modification-table endpoint' code. * Add tests for sync updates and modification-table. * Send an empty response with status-code 204 for outdated clients. * Use socketio event to send modification-table-diff. * Add reconnect event and extend tests. * Refactor and add comments. * Remove uuid and timestamp, and use incremental ids instead. * Use incremental job_id instead of timestamp to clean stale records. * Remove unused imports. * Use HydraLink to improve handling of nested object props. * Add links as GraphIII triples instead of GraphIIT triples. * Add link_prop to assist insertion of linked properties as GraphIII. * Adapt test for nested fields defined with hydra:Link. * Refactor insertion of GraphIII triples for link properties. * Add explicit type check for link properties. * Use latest hydra-python-core from the master branch. * Version bump to 0.3.0 * Update hydra-python-core branch to master
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #375
Checklist
Description
Change logs
Added test for nested objects
Adapt tests to use UUIDs
Corrected mypy type annotation in crud.py