From 82ce5c08c7f35dedee7622660c28e211bf17db63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Fri, 24 Jan 2025 14:34:35 +0100 Subject: [PATCH] FIX: remove value_matches_versionid and get_id_from_versionid_value member functions --- src/linkahead/common/models.py | 8 -------- unittests/test_entity.py | 6 ------ 2 files changed, 14 deletions(-) diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py index bfe43b0..8b8141b 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 2f41371..f2164d9 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(): -- GitLab