Back to index

moin  1.9.0~rc2
Public Member Functions
test_formatter.TestIdIdempotency Class Reference

List of all members.

Public Member Functions

def test_sanitize_to_id_idempotent

Detailed Description

Definition at line 79 of file test_formatter.py.


Member Function Documentation

Definition at line 80 of file test_formatter.py.

00080 
00081     def test_sanitize_to_id_idempotent(self):
00082         def _verify(formatter, id):
00083             origid = formatter.sanitize_to_id(id)
00084             id = origid
00085             for i in xrange(3):
00086                 id = formatter.sanitize_to_id(id)
00087                 assert id == origid
00088 
00089         formatters = wikiutil.getPlugins("formatter", self.request.cfg)
00090         try:
00091             from xml.dom import getDOMImplementation
00092             dom = getDOMImplementation("4DOM")
00093         except ImportError:
00094             # if we don't have 4suite installed, the docbook formatter would just raise an exception
00095             formatters.remove('text_docbook')
00096 
00097         testids = [
00098             r"tho/zeequeen&angu\za",
00099             r"quuirahz\iphohsaij,i",
00100             r"ashuifa+it[ohchieque",
00101             r"ohyie-lakoo`duaghaib",
00102             r"eixaepumuqu[ie\ba|eh",
00103             r"theegieque;zahmeitie",
00104             r"pahcooje&rahkeiz$oez",
00105             r"ohjeeng*iequao%fai?p",
00106             r"ahfoodahmepooquepee;",
00107             r"ubed_aex;ohwebeixah%",
00108             r"eitiekicaejuelae=g^u",
00109             r"",
00110             r'  ',
00111             r'--123',
00112             r'__$$',
00113             r'@@',
00114             u'\xf6\xf6llasdf\xe4',
00115         ]
00116 
00117         for f_name in formatters:
00118             try:
00119                 formatter = wikiutil.importPlugin(self.request.cfg, "formatter",
00120                                                   f_name, "Formatter")
00121                 f = formatter(self.request)
00122                 for id in testids:
00123                     yield _verify, f, id
00124             except wikiutil.PluginAttributeError:
00125                 pass

Here is the call graph for this function:


The documentation for this class was generated from the following file: