From ea86fd9d52fca7c0a8628fdeaa30f3a1baa74c46 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Wed, 13 Nov 2024 12:26:33 +0000 Subject: [PATCH] removed get_value --- pacman/model/resources/iptag_resource.py | 10 ---------- pacman/model/resources/reverse_iptag_resource.py | 7 ------- .../resources_tests/test_resources_model.py | 2 -- 3 files changed, 19 deletions(-) diff --git a/pacman/model/resources/iptag_resource.py b/pacman/model/resources/iptag_resource.py index 96fd1e18b..6df3bb58f 100644 --- a/pacman/model/resources/iptag_resource.py +++ b/pacman/model/resources/iptag_resource.py @@ -102,16 +102,6 @@ def tag(self) -> Optional[int]: """ return self._tag - def get_value(self): - """ - :return: The description of the IP tag. - :rtype: list(str, int, bool, int, str) - """ - return [ - self._ip_address, self._port, self._strip_sdp, self._tag, - self._traffic_identifier - ] - def __repr__(self) -> str: return ( f"IPTagResource(ip_address={self._ip_address}, port={self._port}, " diff --git a/pacman/model/resources/reverse_iptag_resource.py b/pacman/model/resources/reverse_iptag_resource.py index d0ab8e2ed..f67313026 100644 --- a/pacman/model/resources/reverse_iptag_resource.py +++ b/pacman/model/resources/reverse_iptag_resource.py @@ -74,13 +74,6 @@ def tag(self) -> Optional[int]: """ return self._tag - def get_value(self): - """ - :return: The description of the reverse IP tag. - :rtype: list(int, int, int) - """ - return [self._port, self._sdp_port, self._tag] - def __repr__(self) -> str: return (f"ReverseIPTagResource(port={self._port}, " f"sdp_port={self._sdp_port}, tag={self._tag})") diff --git a/unittests/model_tests/resources_tests/test_resources_model.py b/unittests/model_tests/resources_tests/test_resources_model.py index 22f511969..196436c0c 100644 --- a/unittests/model_tests/resources_tests/test_resources_model.py +++ b/unittests/model_tests/resources_tests/test_resources_model.py @@ -126,7 +126,6 @@ def test_tags_resources(self): self.assertEqual(iptr.strip_sdp, 3) self.assertEqual(iptr.tag, 4) self.assertEqual(iptr.traffic_identifier, 5) - self.assertEqual(iptr.get_value(), ['1.2.3.4', 2, 3, 4, 5]) self.assertEqual(str(iptr), "IPTagResource(ip_address=1.2.3.4, port=2, " "strip_sdp=3, tag=4, traffic_identifier=5)") @@ -136,7 +135,6 @@ def test_tags_resources(self): self.assertEqual(riptr.port, 1) self.assertEqual(riptr.sdp_port, 2) self.assertEqual(riptr.tag, 3) - self.assertEqual(riptr.get_value(), [1, 2, 3]) self.assertEqual(str(riptr), "ReverseIPTagResource(port=1, sdp_port=2, tag=3)") riptr2 = ReverseIPtagResource(1, 2, 3)