Back to index

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

List of all members.

Public Member Functions

def performTransform
def testStripTags
def testBreaks
def testStartBlocks
def testEndBlocks
def testIndentBlocks
def testListBlocks
def testNbsp
def testAngles
def testBullets
def testAmpersands
def testEntities
def testPre
def testWhitespace
def afterSetUp

Public Attributes

 transforms

Detailed Description

Definition at line 75 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.TestHtmlToIntelligentText.performTransform (   self,
  orig,
  targetMimetype = 'text/x-web-intelligent',
  mimetype = 'text/html' 
)

Definition at line 77 of file test_intelligenttext.py.

00077 
00078     def performTransform(self, orig, targetMimetype = 'text/x-web-intelligent', mimetype='text/html'):
00079         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 125 of file test_intelligenttext.py.

00125 
00126     def testAmpersands(self):
00127         orig = "An & ampersand"
00128         new = self.performTransform(orig)
00129         self.assertEqual(new, "An & ampersand")
        

Here is the call graph for this function:

Definition at line 115 of file test_intelligenttext.py.

00115 
00116     def testAngles(self):
00117         orig = "Watch <this> and ‹that›"
00118         new = self.performTransform(orig)
00119         self.assertEqual(new, "Watch <this> and &#8249;that&#8250;")
    

Here is the call graph for this function:

Definition at line 85 of file test_intelligenttext.py.

00085 
00086     def testBreaks(self):
00087         orig = "Some<br/>broken<BR/>text<br />"
00088         new = self.performTransform(orig)
00089         self.assertEqual(new, "Some\nbroken\ntext\n")
    

Here is the call graph for this function:

Definition at line 120 of file test_intelligenttext.py.

00120 
00121     def testBullets(self):
00122         orig = "A &bull; bullet"
00123         new = self.performTransform(orig)
00124         self.assertEqual(new, "A &#8226; bullet")
        

Here is the call graph for this function:

Definition at line 95 of file test_intelligenttext.py.

00095 
00096     def testEndBlocks(self):
00097         orig = "<p>Paragraph</p>Other stuff"
00098         new = self.performTransform(orig)
00099         self.assertEqual(new, "Paragraph\n\nOther stuff")
        

Here is the call graph for this function:

Definition at line 130 of file test_intelligenttext.py.

00130 
00131     def testEntities(self):
00132         orig = "A &mdash; dash"
00133         new = self.performTransform(orig)
00134         self.assertEqual(new, "A &#8212; dash")
        

Here is the call graph for this function:

Definition at line 100 of file test_intelligenttext.py.

00100 
00101     def testIndentBlocks(self):
00102         orig = "A<blockquote>Indented blockquote</blockquote>"
00103         new = self.performTransform(orig)
00104         self.assertEqual(new, "A\n\n  Indented blockquote")
    

Here is the call graph for this function:

Definition at line 105 of file test_intelligenttext.py.

00105 
00106     def testListBlocks(self):
00107         orig = "A list<ul><li>Foo</li><li>Bar</li></ul>"
00108         new = self.performTransform(orig)
00109         self.assertEqual(new, "A list\n\n  - Foo\n\n  - Bar\n\n")
        

Here is the call graph for this function:

Definition at line 110 of file test_intelligenttext.py.

00110 
00111     def testNbsp(self):
00112         orig = "Some space &nbsp;&nbsp;here"
00113         new = self.performTransform(orig)
00114         self.assertEqual(new, "Some space   here")
        

Here is the call graph for this function:

Definition at line 135 of file test_intelligenttext.py.

00135 
00136     def testPre(self):
00137         orig = "A <pre>  pre\n  section</pre>"
00138         new = self.performTransform(orig)
00139         self.assertEqual(new, "A \n\n  pre\n  section\n\n")
        

Here is the call graph for this function:

Definition at line 90 of file test_intelligenttext.py.

00090 
00091     def testStartBlocks(self):
00092         orig = "A block<dt>there</dt>"
00093         new = self.performTransform(orig)
00094         self.assertEqual(new, "A block\n\nthere")
    

Here is the call graph for this function:

Definition at line 80 of file test_intelligenttext.py.

00080 
00081     def testStripTags(self):
00082         orig = "Some <b>bold</b> text."
00083         new = self.performTransform(orig)
00084         self.assertEqual(new, "Some bold text.")
    

Here is the call graph for this function:

Definition at line 140 of file test_intelligenttext.py.

00140 
00141     def testWhitespace(self):
00142         orig = "A \n\t spaceful, <b>  tag-filled</b>, <b> <i>  snippet\n</b></i>"
00143         new = self.performTransform(orig)
00144         self.assertEqual(new, "A spaceful, tag-filled, snippet ")
00145 

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: