Back to index

moin  1.9.0~rc2
test_composite_dicts.py
Go to the documentation of this file.
00001 # -*- coding: iso-8859-1 -*-
00002 
00003 """
00004 MoinMoin.datastruct.backends.composite_dicts test
00005 
00006 @copyright: 2009 MoinMoin:DmitrijsMilajevs
00007             2008 MoinMoin: MelitaMihaljevic
00008 @license: GPL, see COPYING for details
00009 """
00010 
00011 from py.test import raises
00012 
00013 from MoinMoin.datastruct.backends._tests import DictsBackendTest
00014 from MoinMoin.datastruct import ConfigDicts, CompositeDicts, DictDoesNotExistError
00015 from MoinMoin._tests import wikiconfig
00016 from MoinMoin import security
00017 
00018 
00019 class TestCompositeDict(DictsBackendTest):
00020 
00021     class Config(wikiconfig.Config):
00022 
00023         one_dict = {u'SomeTestDict': {u'First': u'first item',
00024                                       u'text with spaces': u'second item',
00025                                       u'Empty string': u'',
00026                                       u'Last': u'last item'}}
00027 
00028         other_dict = {u'SomeOtherTestDict': {u'One': '1',
00029                                              u'Two': '2'}}
00030 
00031         def dicts(self, request):
00032             return CompositeDicts(request,
00033                                   ConfigDicts(request, self.one_dict),
00034                                   ConfigDicts(request, self.other_dict))
00035 
00036 
00037 coverage_modules = ['MoinMoin.datastruct.backends.composite_dicts']