Add tests for the server env mixin

This commit is contained in:
Guewen Baconnier 2018-07-23 17:34:00 +02:00 committed by Stéphane Bidoul (ACSONE)
parent 80a56d320a
commit e096c209ed
No known key found for this signature in database
GPG Key ID: BCAB2555446B5B92
1 changed files with 2 additions and 1 deletions

View File

@ -136,7 +136,7 @@ class ServerEnvMixin(models.AbstractModel):
},
"sftp_port": {
"getter": "getint",
},,
},
"sftp_login": {},
"sftp_password": {},
}
@ -319,6 +319,7 @@ class ServerEnvMixin(models.AbstractModel):
def _server_env_transform_field_to_read_from_env(self, field):
"""Transform the original field in a computed field"""
field.compute = '_compute_server_env'
inverse_method_name = '_inverse_server_env_%s' % field.name
inverse_method = partialmethod(
ServerEnvMixin._inverse_server_env, field.name