Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inject a GetOrCreateMixin to Node and Relationship. (#244)
* Align develop and main branch (#237) Co-authored-by: Bruno Sačarić <bruno.sacaric@gmail.com> * Inject a GetOrCreateMixin to Node and Relationship. * Use the imported GQLAlchemyError instead of a fully qualified path. * Use the imported Tuple instead of fully qualified typing.Tuple * Run black. * suppress flake8's f821 on get_or_create definition * Add tests for get_or_create and refactor the mixin into separate implementations for improved docs. Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com> * Apply black. Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com> * Apply black to tests as well. Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com> * typo fix in function signature. Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com> * Assert the counts of nodes and relationships in the test. Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com> * Apply black. Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com> * Add the .execute() to the query builder in failing tests and provide "name" to the node instantiation because it is a required field. * another attempt to fix the query builder usage in tests. * apply black fixes. * Fix tests by relying on the database identifier `_id` instead of the user-defined `id`. Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com> * Remove unused test functions. Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com> --------- Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com> Co-authored-by: Katarina Supe <61758502+katarinasupe@users.noreply.github.com> Co-authored-by: Bruno Sačarić <bruno.sacaric@gmail.com> Co-authored-by: katarinasupe <supe.katarina@gmail.com> Co-authored-by: Aalekh Patel <aalekh@protectchildren.ca>
- Loading branch information