From 6cbdce574136cc30d62023e9d4d049dae02ad19a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 12 Oct 2020 23:24:55 +0200 Subject: [PATCH] Fallback to assert_called when assert_called_once does not exist --- tests/test_web_shop_vue_storefront.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_web_shop_vue_storefront.py b/tests/test_web_shop_vue_storefront.py index 5abe2eec79..cc0e0cf61e 100644 --- a/tests/test_web_shop_vue_storefront.py +++ b/tests/test_web_shop_vue_storefront.py @@ -211,7 +211,10 @@ class WebVueStorefrontTestCase(ModuleTestCase): }) self.assertFalse(result) - reset_password.assert_called_once() + try: + reset_password.assert_called_once() + except AttributeError: + reset_password.assert_called() @with_transaction(user=0) def test_user_change_password(self):