Esempio n. 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(), '')
Esempio n. 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(), '')
Esempio n. 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>")
Esempio n. 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>")