view MoinMoin/macro/_tests/test_FootNote.py @ 4044:54d9588300de

macro._tests: whitespace removed, docstring adjusted
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 16 Aug 2008 10:37:40 +0200
parents adf9f4a9cfb5
children
line wrap: on
line source
# -*- coding: utf-8 -*-
"""
    MoinMoin - MoinMoin.macro.FootNote Tests

    @copyright: 2008 MoinMoin:ReimarBauer
    @license: GNU GPL, see COPYING for details.
"""
import os

from MoinMoin import macro
from MoinMoin.macro import FootNote
from MoinMoin.Page import Page
from MoinMoin.PageEditor import PageEditor
from MoinMoin._tests import become_trusted, create_page, make_macro, nuke_page

class TestFootNote:
    """ testing macro Action calling action raw """
    pagename = u'AutoCreatedMoinMoinTemporaryTestPageForFootNote'

    def setup_class(self):
        become_trusted(self.request)
        self.page = create_page(self.request, self.pagename, u"Foo!")

    def teardown_class(self):
        nuke_page(self.request, self.pagename)

    def test_enumbering(self):
        """ module_tested: enumbering of Footnotes"""
        m = make_macro(self.request, self.page)
        text = 'a'
        FootNote.execute(m, text)
        text = 'b'
        FootNote.execute(m, text)
        result = FootNote.emit_footnotes(m.request, m.request.formatter)
        assert result.endswith('2</a>)</li></ol></div>')

coverage_modules = ['MoinMoin.macro.FootNote']