XML unit tests don't support count attribute

Bug #541545 reported by Don Kirkby
6
This bug affects 1 person
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://doc.openerp.com/developer/5_20_unit_testing/index.html#assert-tag

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

Revision history for this message
Don Kirkby (donkirkby) wrote :

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.

Changed in openobject-server:
assignee: nobody → Christophe (OpenERP) (kangol)
Changed in openobject-server:
status: New → Fix Released
Changed in openobject-server:
milestone: none → 5.0.10
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.