diff --git a/kolibri/core/test/test_utils.py b/kolibri/core/test/test_utils.py index 8d5290cf54d..986afb20417 100644 --- a/kolibri/core/test/test_utils.py +++ b/kolibri/core/test/test_utils.py @@ -68,6 +68,7 @@ def test_retry_on_db_lock__no_handling_unless_sqlite(self): from sqlite3 import OperationalError func = mock.MagicMock() + func.__name__ = "test_func" func.side_effect = [OperationalError("database is locked"), True] wrapped = retry_on_db_lock(func) with self.assertRaises(OperationalError): @@ -89,6 +90,7 @@ def test_retry_on_db_lock__retry(self): from sqlite3 import OperationalError func = mock.MagicMock() + func.__name__ = "test_func" func.side_effect = [OperationalError("database is locked"), True] wrapped = retry_on_db_lock(func) result = wrapped() @@ -103,6 +105,7 @@ def test_retry_on_db_lock__retry__maximum_attempts(self): from sqlite3 import OperationalError func = mock.MagicMock() + func.__name__ = "test_func" func.side_effect = [OperationalError("database is locked")] * 6 wrapped = retry_on_db_lock(func) with self.assertRaises(OperationalError):