From b72cfff6a9a3bdba93416f72b276e9fce7df4ac7 Mon Sep 17 00:00:00 2001 From: Slawomir Jankowski Date: Tue, 11 Feb 2020 12:21:19 +0100 Subject: [PATCH] Overload equality operator in cleaning policy params' classes Signed-off-by: Slawomir Jankowski --- test/functional/api/cas/cache_config.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/functional/api/cas/cache_config.py b/test/functional/api/cas/cache_config.py index c66e862..f6ef5bb 100644 --- a/test/functional/api/cas/cache_config.py +++ b/test/functional/api/cas/cache_config.py @@ -147,6 +147,12 @@ class FlushParametersAlru: alru_params.wake_up_time = (1, 3600) return alru_params + def __eq__(self, other): + return self.activity_threshold == other.activity_threshold and \ + self.flush_max_buffers == other.flush_max_buffers and \ + self.staleness_time == other.staleness_time and \ + self.wake_up_time == other.wake_up_time + @staticmethod def default_alru_params(): alru_params = FlushParametersAlru() @@ -175,6 +181,10 @@ class FlushParametersAcp: acp_params.wake_up_time = (0, 10000) return acp_params + def __eq__(self, other): + return self.flush_max_buffers == other.flush_max_buffers and \ + self.wake_up_time == other.wake_up_time + @staticmethod def default_acp_params(): acp_params = FlushParametersAcp()