[FIX] core: avoid tests to contact gravatar server

This commit is contained in:
Christophe Simonis
2017-08-01 22:03:39 +02:00
parent ab0e083ecb
commit ed36929265
+2
View File
@@ -160,6 +160,8 @@ class TransactionCase(BaseCase):
self.cr.rollback()
self.cr.close()
self.patch(type(self.env['res.partner']), '_get_gravatar_image', lambda *a: False)
def patch(self, obj, key, val):
""" Do the patch ``setattr(obj, key, val)``, and prepare cleanup. """
old = getattr(obj, key)