Back to index

moin  1.9.0~rc2
test_utils.py
Go to the documentation of this file.
00001 # -*- coding: utf-8 -*-
00002 """
00003     MoinMoin - MoinMoin.web.utils Tests
00004 
00005     @copyright: 2008 MoinMoin:FlorianKrupicka
00006     @license: GNU GPL, see COPYING for details.
00007 """
00008 import py
00009 
00010 from MoinMoin.web import utils
00011 
00012 class TestUniqueIDGenerator(object):
00013 
00014     def setup_method(self, method):
00015         self.uid_gen = utils.UniqueIDGenerator('TestPage')
00016 
00017     def testGeneration(self):
00018         TESTCASES = [('somebase', 'somebase'), ('other', 'other'),
00019                      ('somebase', 'somebase-1'), ('another', 'another'),
00020                      ('other', 'other-1'), ('other', 'other-2'),
00021                      ('somebase', 'somebase-2')]
00022         for base, expected in TESTCASES:
00023             assert self.uid_gen(base) == expected
00024 
00025     def testStack(self):
00026         py.test.skip("TODO: needs implementation")
00027 
00028     def testDocuments(self):
00029         py.test.skip("TODO: needs implementation")