diff MoinMoin/_tests/test_pysupport.py @ 657:016a8a3ef354

wikiutil.MimeType class, renamed parsers to mimetype like module names
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 16 May 2006 20:12:29 +0200
parents 54d5932d5a03
children 9931a09387b0
line wrap: on
line diff
--- a/MoinMoin/_tests/test_pysupport.py	Tue May 16 13:10:13 2006 +0200
+++ b/MoinMoin/_tests/test_pysupport.py	Tue May 16 20:12:29 2006 +0200
@@ -26,13 +26,13 @@
     def testNonExistingAttribute(self):
         """ pysupport: import nonexistent attritbue raises AttributeError """
         self.assertRaises(AttributeError, pysupport.importName,
-                          'MoinMoin.parser.wiki','NoSuchParser')
+                          'MoinMoin.parser.text_moin_wiki','NoSuchParser')
 
     def testExisting(self):
         """ pysupport: import name from existing module """
-        from MoinMoin.parser import wiki
-        Parser = pysupport.importName('MoinMoin.parser.wiki', 'Parser')
-        self.failUnless(Parser is wiki.Parser)
+        from MoinMoin.parser import text_moin_wiki
+        Parser = pysupport.importName('MoinMoin.parser.text_moin_wiki', 'Parser')
+        self.failUnless(Parser is text_moin_wiki.Parser)
    
 
 class ImportNameFromPlugin(unittest.TestCase):
@@ -42,11 +42,9 @@
     
     def setUp(self):
         """ Check for valid plugin package """
-        self.pluginDirectory = os.path.join(self.request.cfg.data_dir,
-                                            'plugin', 'parser')
+        self.pluginDirectory = os.path.join(self.request.cfg.data_dir, 'plugin', 'parser')
         self.checkPackage(self.pluginDirectory)
-        self.pluginModule = (self.request.cfg.siteid + '.plugin.parser.' +
-                             self.plugin)
+        self.pluginModule = (self.request.cfg.siteid + '.plugin.parser.' + self.plugin)
 
     def checkPackage(self, path):
         for item in (path, os.path.join(path, '__init__.py')):
@@ -124,5 +122,4 @@
             except OSError, err:
                 if err.errno != errno.ENOENT:
                     raise
-    
-            
\ No newline at end of file
+