From 4c9edc1009a7b8a72559456bd1cac5d02389b710 Mon Sep 17 00:00:00 2001 From: Asif Saif Uddin Date: Wed, 18 Oct 2023 15:39:28 +0600 Subject: [PATCH] using assert_called_once() --- t/unit/asynchronous/test_hub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/unit/asynchronous/test_hub.py b/t/unit/asynchronous/test_hub.py index 27b048b94..e46d338df 100644 --- a/t/unit/asynchronous/test_hub.py +++ b/t/unit/asynchronous/test_hub.py @@ -193,7 +193,7 @@ def test_call_soon_uses_lock(self): callback = Mock(name='callback') with patch.object(self.hub, '_ready_lock', autospec=True) as lock: self.hub.call_soon(callback) - assert lock.__enter__.called_once() + lock.__enter__.assert_called_once() def test_call_soon__promise_argument(self): callback = promise(Mock(name='callback'), (1, 2, 3))