Commit bea2efc8 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[profile generation] Fix concept language used in case of SEDA 0.2 export

We should override the concepts_language class attribute else we'll use the
inherited 'seda-1' language.
parent 21de2d5db256
......@@ -1130,6 +1130,8 @@ class SEDA02XSDExport(SEDA1XSDExport):
root_attributes['targetNamespace'] = 'fr:gouv:ae:archive:draft:standard_echange_v0.2'
root_attributes['version'] = '1.1'
concepts_language = 'seda-02'
def xsd_transfer(self, parent, archive_transfer):
"""Append XSD elements for the archive transfer to the given parent node."""
transfer_node = self.xsd_transfer_base(parent, archive_transfer)
......
......@@ -23,6 +23,7 @@ from doctest import Example
from itertools import chain, izip, repeat
import os
from os.path import basename, join
import unittest
from six import binary_type, text_type
......@@ -917,6 +918,12 @@ class OldSEDARNGExportTC(RelaxNGTestMixin, OldSEDAExportMixin, CubicWebTC):
self.check_xsd_profile(root, self.datapath('seda_02_bordereau_ref.xml'))
class SEDAExportUnitTest(unittest.TestCase):
def test_concepts_languages(self):
self.assertEqual(pg.SEDA1XSDExport.concepts_language, 'seda-1')
self.assertEqual(pg.SEDA02XSDExport.concepts_language, 'seda-02')
if __name__ == '__main__':
import unittest
unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment