From f48541bf973328440c867b0df475bac22c26bc42 Mon Sep 17 00:00:00 2001 From: hanhsuan Date: Fri, 29 Nov 2024 15:30:57 +0800 Subject: [PATCH] zip might make the monitors order, therefore changing the assertion method --- .../checkbox_support/dbus/tests/test_gnome_monitor.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/checkbox-support/checkbox_support/dbus/tests/test_gnome_monitor.py b/checkbox-support/checkbox_support/dbus/tests/test_gnome_monitor.py index 3e1a44aa20..dcc04c81ad 100644 --- a/checkbox-support/checkbox_support/dbus/tests/test_gnome_monitor.py +++ b/checkbox-support/checkbox_support/dbus/tests/test_gnome_monitor.py @@ -1,3 +1,4 @@ +import re import sys import unittest from unittest.mock import patch, Mock, MagicMock @@ -404,6 +405,6 @@ def test_cycle_no_cycling(self, mock_dbus_proxy): timeout_msec=-1, cancellable=None, ) - mock_callback.assert_called_with( - "HDMI-1_2560x1440_normal_eDP-1_1920x1200_normal_" - ) + argument_string = mock_callback.call_args[0][0] + pattern = re.compile("HDMI-1_2560x1440_normal_eDP-1_1920x1200_normal_|eDP-1_1920x1200_normal_HDMI-1_2560x1440_normal_") + assert pattern.match(argument_string)