示例#1
0
    def test_empty_background(self):
        xmldata = """<background>
</background>"""
        node = etree.fromstring(xmldata)
        bg = Background()
        bg.configure_from_node(node, self.defaults, self.project)
        astext = bg.get_docbook()
        self.failUnlessEqual(astext.rstrip(), '')
示例#2
0
    def test_empty_background(self):
        xmldata = """<background>
</background>"""
        node = etree.fromstring(xmldata)
        bg = Background()
        bg.configure_from_node(node, self.defaults, self.project)
        astext = bg.get_docbook()
        self.failUnlessEqual(astext.rstrip(), '')
示例#3
0
    def test_minimal_background(self):
        xmldata = """
<background>
  <para>This is a dummy description for testing.</para>
</background>"""
        node = etree.fromstring(xmldata)
        bg = Background()
        bg.configure_from_node(node, self.defaults, self.project)
        astext = bg.get_docbook()
        self.failUnlessEqual(astext.rstrip(), "<para>This is a dummy description for testing.</para>")
示例#4
0
    def test_minimal_background(self):
        xmldata = """
<background>
  <para>This is a dummy description for testing.</para>
</background>"""
        node = etree.fromstring(xmldata)
        bg = Background()
        bg.configure_from_node(node, self.defaults, self.project)
        astext = bg.get_docbook()
        self.failUnlessEqual(
            astext.rstrip(),
            "<para>This is a dummy description for testing.</para>")