-
-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some tests #215
Fix some tests #215
Conversation
@@ -443,10 +443,11 @@ def unwrap_binding(self, binding_id, browse=False): | |||
else: | |||
binding = self.model.browse(binding_id) | |||
|
|||
openerp_record = getattr(binding, self._openerp_field) | |||
# XXX: do we expect to have a m2o field here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guewen this is not clear to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self._openerp_field
should be the m2o fields towards the "normal" record (the m2o used in the _inherits
), does it answer to you question?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed the test as we said ;)
@@ -443,10 +443,10 @@ def unwrap_binding(self, binding_id, browse=False): | |||
else: | |||
binding = self.model.browse(binding_id) | |||
|
|||
openerp_record = getattr(binding, self._openerp_field) | |||
record = getattr(binding, self._openerp_field) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lasley IMO it's not a security issue since _openerp_field
is defined in the source code and not exposed to the ui...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lmignon - Seems like a best practice to use item lookup instead of attribute for recordsets IMO, but you are correct that it's not editable in the UI. I'll remove the PR block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the record #218 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lasley You are right, it's a best practice 😏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One note + please rebase & resolve conflict
@simahawk Can you rebase and resolve the conflict? |
@lmignon should be done :) |
test_default_binder
is not tested at all on runbotUnfortunately doctests loader in test_runner_channels.py do not work with nose, it throws this error: