From a9a5e79218961845cce5530a46e941511bceb34a Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 19 Jul 2024 13:18:39 +0100 Subject: [PATCH] Fix compatibility with Python 3.12 --- echo/tests/test_selection.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/echo/tests/test_selection.py b/echo/tests/test_selection.py index 7bb552435..9a079a44c 100644 --- a/echo/tests/test_selection.py +++ b/echo/tests/test_selection.py @@ -98,13 +98,13 @@ def test_callbacks(self): self.state.add_callback('a', func) self.a.set_choices(self.state, [1, 2, 3]) - assert func.called_once_with(1) + func.assert_called_with(1) self.state.a = 2 - assert func.called_once_with(2) + func.assert_called_with(2) self.a.set_choices(self.state, [4, 5, 6]) - assert func.called_once_with(4) + func.assert_called_with(4) def test_choice_separator(self): @@ -128,7 +128,7 @@ def test_delay(self): with delay_callback(self.state, 'a'): self.a.set_choices(self.state, [4, 5, 6]) assert func.call_count == 0 - assert func.called_once_with(4) + func.assert_called_once_with(4) func.reset_mock() # Check that the callback gets called even if only the choices @@ -136,5 +136,5 @@ def test_delay(self): with delay_callback(self.state, 'a'): self.a.set_choices(self.state, [1, 2, 4]) assert func.call_count == 0 - assert func.called_once_with(4) + func.assert_called_once_with(4) func.reset_mock()