XML unit tests don't support count attribute
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
Christophe Simonis (OpenERP) |
Bug Description
This is very similar to bug lp:534769, but for the count attribute on the assert tag.
The developer documentation for writing unit tests says that you can include the count attribute on assert elements. When I try to do that, I get the following error:
AssertionError: Invalid attribute count for element assert, line 16
The developer documentation is here:
http://
Analysis:
The fix uses the same technique as bug lp:534769. I will post a merge proposal that contains a failing unit test, plus the fix to make the test pass.
It looks like the code is all there to support the context attribute, but it's not allowed by the RelaxNG schema. I just modified the schema to allow the count attribute.
Related branches
- Christophe Simonis (OpenERP): Pending requested
- OpenERP Core Team: Pending requested
-
Diff: 19 lines (+11/-0)1 file modifiedbin/addons/base/base_test.xml (+11/-0)
Changed in openobject-server: | |
status: | New → Fix Released |
Changed in openobject-server: | |
milestone: | none → 5.0.10 |
I assigned the bug to Christophe, because he actually fixed it. (I assume without noticing this bug report.) I'll leave it to him to decide whether to merge in the test case before marking this bug as fixed.
I'm also going to assign bug lp:534769 to him because they're so similar.