XML unit tests don't support context attribute

Bug #534769 reported by Don Kirkby
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Low
Christophe Simonis (OpenERP)

Bug Description

The developer documentation for writing unit tests says that you can include the context attribute on data, assert, function, and workflow elements. When I try to do that, I get the following error:

AssertionError: Invalid attribute context for element assert, line 16

The developer documentation is here:
http://doc.openerp.com/developer/5_20_unit_testing/index.html#generalities

Analysis:
I've dug into the code and I think I've found a fix. 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 context in the appropriate places.

Related branches

Changed in openobject-server:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Don Kirkby (donkirkby) wrote :

I assigned the bug to Christophe, since he committed a fix for bug lp:541545, which is very similar.

Changed in openobject-server:
assignee: nobody → Christophe (OpenERP) (kangol)
Changed in openobject-server:
status: Confirmed → 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.