Fallback to assert_called when assert_called_once does not exist

This commit is contained in:
Cédric Krier committed 2020-10-12 23:24:55 +02:00
1 parent 16ba3ec451
commit 6cbdce5741
1 file changed
+4 -1
+4 -1
View File
@@ -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):