Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
PortalTransforms.tests.test_intelligenttext.TestIntelligentTextToHtml Class Reference
Inheritance diagram for PortalTransforms.tests.test_intelligenttext.TestIntelligentTextToHtml:
Inheritance graph
[legend]
Collaboration diagram for PortalTransforms.tests.test_intelligenttext.TestIntelligentTextToHtml:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def performTransform
def testHyperlinks
def testMailto
def testTextAndLinks
def testTextAndLinksAtEndOfLine
def testIndents
def testEntities
def testAccentuatedCharacters
def afterSetUp

Public Attributes

 transforms

Detailed Description

Definition at line 14 of file test_intelligenttext.py.


Member Function Documentation

Definition at line 9 of file test_intelligenttext.py.

00009 
00010     def afterSetUp(self):
00011         ATSiteTestCase.afterSetUp(self)
00012         self.transforms = self.portal.portal_transforms
00013 

def PortalTransforms.tests.test_intelligenttext.TestIntelligentTextToHtml.performTransform (   self,
  orig,
  targetMimetype = 'text/html',
  mimetype = 'text/x-web-intelligent' 
)

Definition at line 16 of file test_intelligenttext.py.

00016 
00017     def performTransform(self, orig, targetMimetype = 'text/html', mimetype='text/x-web-intelligent'):
00018         return self.transforms.convertTo(targetMimetype, orig, context=self.portal, mimetype=mimetype).getData()
    

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 70 of file test_intelligenttext.py.

00070 
00071     def testAccentuatedCharacters(self):
00072         orig = "The French use é à ô ù à and ç"
00073         new = self.performTransform(orig)
00074         self.assertEqual(new, "The French use é à ô ù à and ç")

Here is the call graph for this function:

Definition at line 64 of file test_intelligenttext.py.

00064 
00065     def testEntities(self):
00066         orig = "Some & funny < characters"
00067         new = self.performTransform(orig)
00068         self.assertEqual(new, "Some &amp; funny &lt; characters")
00069         
        

Here is the call graph for this function:

Definition at line 19 of file test_intelligenttext.py.

00019 
00020     def testHyperlinks(self):
00021         orig = "A test http://test.com"
00022         new = self.performTransform(orig)
00023         self.assertEqual(new, 'A test <a href="http://test.com" rel="nofollow">http://test.com</a>')

Here is the call graph for this function:

Definition at line 52 of file test_intelligenttext.py.

00052 
00053     def testIndents(self):
00054         orig = """A test
00055   URL: http://test.com
00056     Mail: test@test.com
00057       URL: http://foo.com"""
00058         new = self.performTransform(orig)
00059         self.assertEqual(new, 'A test<br />' \
00060                               '&nbsp;&nbsp;URL: <a href="http://test.com" rel="nofollow">http://test.com</a><br />' \
00061                               '&nbsp;&nbsp;&nbsp;&nbsp;Mail: <a href="&#0109;ailto&#0058;test&#0064;test.com">test&#0064;test.com</a><br />' \
00062                               '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;URL: <a href="http://foo.com" rel="nofollow">http://foo.com</a>')
00063 
    

Here is the call graph for this function:

Definition at line 24 of file test_intelligenttext.py.

00024 
00025     def testMailto(self):
00026         orig = "A test test@test.com of mailto"
00027         new = self.performTransform(orig)
00028         self.assertEqual(new, 'A test <a href="&#0109;ailto&#0058;test&#0064;test.com">test&#0064;test.com</a> of mailto')
    

Here is the call graph for this function:

Definition at line 29 of file test_intelligenttext.py.

00029 
00030     def testTextAndLinks(self):
00031         orig = """A test
00032 URL: http://test.com End
00033 Mail: test@test.com End
00034 URL: http://foo.com End"""
00035         new = self.performTransform(orig)
00036         self.assertEqual(new, 'A test<br />' \
00037                               'URL: <a href="http://test.com" rel="nofollow">http://test.com</a> End<br />' \
00038                               'Mail: <a href="&#0109;ailto&#0058;test&#0064;test.com">test&#0064;test.com</a> End<br />' \
00039                               'URL: <a href="http://foo.com" rel="nofollow">http://foo.com</a> End')
                              

Here is the call graph for this function:

Definition at line 40 of file test_intelligenttext.py.

00040 
00041     def testTextAndLinksAtEndOfLine(self):
00042         orig = """A test
00043 URL: http://test.com
00044 Mail: test@test.com
00045 URL: http://foo.com"""
00046         new = self.performTransform(orig)
00047         self.assertEqual(new, 'A test<br />' \
00048                               'URL: <a href="http://test.com" rel="nofollow">http://test.com</a><br />' \
00049                               'Mail: <a href="&#0109;ailto&#0058;test&#0064;test.com">test&#0064;test.com</a><br />' \
00050                               'URL: <a href="http://foo.com" rel="nofollow">http://foo.com</a>')
00051         
        

Here is the call graph for this function:


Member Data Documentation

Definition at line 11 of file test_intelligenttext.py.


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