diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py index bfe43b01367c9a8b47768240aa3f47a3cf31354c..8b8141bea1a3dc5dba28257136fe03fdea2f6ba0 100644 --- a/src/linkahead/common/models.py +++ b/src/linkahead/common/models.py @@ -2129,14 +2129,6 @@ class Property(Entity): else: return is_reference(self.datatype) - def value_matches_versionid(self): - """Returns True if the value matches the pattern <id>@<version>""" - return value_matches_versionid(self.value) - - def get_id_from_versionid_value(self): - """Returns the ID part of the versionid with the pattern <id>@<version>""" - return get_id_from_versionid(self.value) - class Message(object): diff --git a/unittests/test_entity.py b/unittests/test_entity.py index 2f413717c48f9e5424b6a380127db6a6be9760df..f2164d9680471e0ed52b47943f0108ef7e4ce60f 100644 --- a/unittests/test_entity.py +++ b/unittests/test_entity.py @@ -307,16 +307,10 @@ def test_value_matches_versionid(): "integer is no version id") is True with raises(ValueError): value_matches_versionid(234.0) - p = Property(value=234) - assert p.value_matches_versionid() is False - p = Property(value="234@bfe1a42cb37aae8ac625a757715d38814c274158") - assert p.value_matches_versionid() is True def test_get_id_from_versionid(): assert get_id_from_versionid("234@bfe1a42cb37aae8ac625a757715d38814c274158") == "234" - p = Property(value="234@bfe1a42cb37aae8ac625a757715d38814c274158") - assert p.get_id_from_versionid_value() == "234" def test_get_versionid():