view MoinMoin/_tests/test_Page.py @ 1918:bb2e053067fb

fixing copyright headers: remove umlauts (encoding troubles), make epydoc compatible, reformat
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 27 Mar 2007 21:07:33 +0200
parents 9931a09387b0
children 1339d6fdc4ff
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
"""
    MoinMoin - MoinMoin.Page Tests

    @copyright: 2003-2004 by Juergen Hermann <jh@web.de>
    @license: GNU GPL, see COPYING for details.
"""

import unittest
from MoinMoin import Page

class existsTestCase(unittest.TestCase):
    """Page: testing wiki page"""

    def testExists(self):
        """ Page: page.exists() finds existing pages only """
        tests = (
            # Page name,                            expected
            ('FrontPage',                           1),
            ('OnlyAnIdiotWouldCreateSuchaPage',     0),
            )
        for name, expected in tests:
            pg = Page.Page(self.request, name)
            self.assertEqual(pg.exists(), expected,
                             '%s should%s exist' % (name, (' not', '')[expected]))