Skip to content
Snippets Groups Projects
Commit 06c8b283 authored by Alexander Kreft's avatar Alexander Kreft
Browse files

test and changelog

parent b3c9c27a
No related branches found
No related tags found
1 merge request!19ENH: add resolve_value to Property
...@@ -9,10 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -9,10 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### ### Added ###
* extended apiutils with resolve_reference(Property)
### Changed ### ### Changed ###
### Deprecated ### ### Deprecated ###
* id_query(ids) in apiutils
### Removed ### ### Removed ###
### Fixed ### ### Fixed ###
......
...@@ -95,7 +95,10 @@ def test_resolve_reference(): ...@@ -95,7 +95,10 @@ def test_resolve_reference():
assert i.id == 500 assert i.id == 500
assert isinstance(i, db.Entity) assert isinstance(i, db.Entity)
assert resolve_reference(db.Property(id=5000, datatype=db.INTEGER, value=2)) == None no_reference= db.Property(id=5000, datatype=db.INTEGER, value=2)
resolve_reference(no_reference)
assert no_reference.value == 2
assert isinstance(no_reference.datatype, db.INTEGER)
# restore retrive_entity_with_id # restore retrive_entity_with_id
caosdb.apiutils.retrieve_entity_with_id = original_retrieve_entity_with_id caosdb.apiutils.retrieve_entity_with_id = original_retrieve_entity_with_id
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment