+
+
+
+ """,
+ }
+
+ contents = HomeStaticTemplateHelpers.get_qweb_templates(addons=self._get_module_names(), debug=True)
+ expected = b"""
+
+
+
+ """
+
+ self.assertXMLEqual(contents, expected)
+
+ def test_replace_in_debug_mode3(self):
+ """Text outside of a div which will replace a whole template
+ becomes outside of the template
+ This doesn't mean anything in terms of the business of template inheritance
+ But it is in the XPATH specs"""
+ self.modules = [
+ ('module_1_file_1', None, 'module_1'),
+ ]
+ self.template_files = {
+ 'module_1_file_1': b"""
+
+
+
+
+
+ And I grew strong
+
And I learned how to get along
+
+ And so you're back
+
+
+
+ """,
+ }
+
+ contents = HomeStaticTemplateHelpers.get_qweb_templates(addons=self._get_module_names(), debug=True)
+ expected = b"""
+
+
+ And so you're back
+
+ """
+
+ self.assertXMLEqual(contents, expected)
+
+ def test_replace_root_node_tag(self):
+ """
+ Root node is not targeted by //NODE_TAG in xpath
+ """
+ self.modules = [
+ ('module_1_file_1', None, 'module_1'),
+ ]
+ self.template_files = {
+ 'module_1_file_1': b"""
+
+
+
+
+
+