configurationengine/source/plugins/symbian/ConeHCRPlugin/hcrplugin/tests/unittest_hcrml_impl.py
equal
deleted
inserted
replaced
13 # |
13 # |
14 # Description: |
14 # Description: |
15 # |
15 # |
16 |
16 |
17 import os, unittest |
17 import os, unittest |
18 import __init__ |
18 |
19 from cone.public import plugin |
19 from cone.public import plugin |
20 from hcrplugin.hcrml_parser import HcrmlReader |
|
21 |
20 |
22 def impl_from_resource(resource_ref, configuration): |
21 def impl_from_resource(resource_ref, configuration): |
23 """ |
22 """ |
24 Read a HCRML implementation from the given resource in a configuration. |
23 Read a HCRML implementation from the given resource in a configuration. |
25 """ |
24 """ |
26 doc_root = plugin.ReaderBase._read_xml_doc_from_resource(resource_ref, configuration) |
25 impls = plugin.ImplFactory.get_impls_from_file(resource_ref, configuration) |
27 return HcrmlReader.read_impl(resource_ref, configuration, doc_root) |
26 assert len(impls) == 1 |
|
27 return impls[0] |
28 |
28 |
29 ROOT_PATH = os.path.dirname(os.path.abspath(__file__)) |
29 ROOT_PATH = os.path.dirname(os.path.abspath(__file__)) |
30 |
30 |
31 NAMESPACE = 'http://www.symbianfoundation.org/xml/hcrml/1' |
31 NAMESPACE = 'http://www.symbianfoundation.org/xml/hcrml/1' |
32 |
32 |