[Checkins] SVN: Products.MIMETools/trunk/src/Products/MIMETools/tests.py Add one more test for registration of the mime tag

Hanno Schlichting hannosch at hannosch.eu
Sat Jul 10 05:06:25 EDT 2010


Log message for revision 114469:
  Add one more test for registration of the mime tag
  

Changed:
  U   Products.MIMETools/trunk/src/Products/MIMETools/tests.py

-=-
Modified: Products.MIMETools/trunk/src/Products/MIMETools/tests.py
===================================================================
--- Products.MIMETools/trunk/src/Products/MIMETools/tests.py	2010-07-10 09:02:53 UTC (rev 114468)
+++ Products.MIMETools/trunk/src/Products/MIMETools/tests.py	2010-07-10 09:06:25 UTC (rev 114469)
@@ -15,10 +15,20 @@
 
 class MimeTest(unittest.TestCase):
 
-    def _makeOne(self, blocks=[]):
+    def _getTargetClass(self):
         from Products.MIMETools import MIMETag
-        return MIMETag.MIMETag(blocks)
+        return MIMETag.MIMETag
 
+    def _makeOne(self, blocks=[]):
+        klass = self._getTargetClass()
+        return klass(blocks)
+
+    def test_registered(self):
+        klass = self._getTargetClass()
+        from DocumentTemplate.DT_String import String
+        self.failUnless('mime' in String.commands)
+        self.failUnless(String.commands['mime'] is klass)
+
     def test_init(self):
         tag = self._makeOne()
         self.assertEquals(tag.sections, [])



More information about the checkins mailing list