@ -20,7 +20,7 @@ try:
except ImportError :
except ImportError :
_logger . debug ( ' Cannot `import checksumdir`. ' )
_logger . debug ( ' Cannot `import checksumdir`. ' )
model = ' odoo.addons.module_auto_update.models.module '
model = ' odoo.addons.module_auto_update.models.module_deprecated '
class EndTestException ( Exception ) :
class EndTestException ( Exception ) :
@ -180,6 +180,7 @@ class TestModule(TransactionCase):
def test_create ( self ) :
def test_create ( self ) :
""" It should call _store_checksum_installed method """
""" It should call _store_checksum_installed method """
_store_checksum_installed_mock = mock . MagicMock ( )
_store_checksum_installed_mock = mock . MagicMock ( )
try :
self . env [ ' ir.module.module ' ] . _patch_method (
self . env [ ' ir.module.module ' ] . _patch_method (
' _store_checksum_installed ' ,
' _store_checksum_installed ' ,
_store_checksum_installed_mock ,
_store_checksum_installed_mock ,
@ -190,6 +191,7 @@ class TestModule(TransactionCase):
}
}
self . create_test_module ( vals )
self . create_test_module ( vals )
_store_checksum_installed_mock . assert_called_once_with ( vals )
_store_checksum_installed_mock . assert_called_once_with ( vals )
finally :
self . env [ ' ir.module.module ' ] . _revert_method (
self . env [ ' ir.module.module ' ] . _revert_method (
' _store_checksum_installed ' ,
' _store_checksum_installed ' ,
)
)