Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
94dc3d49
Commit
94dc3d49
authored
Feb 08, 2009
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust tests to new zope.tal/zope.pagetemplate version
parent
4e9b8a5f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
src/Products/Five/browser/tests/pages.txt
src/Products/Five/browser/tests/pages.txt
+2
-2
src/Products/PageTemplates/tests/testZopePageTemplate.py
src/Products/PageTemplates/tests/testZopePageTemplate.py
+2
-2
src/Products/PageTemplates/tests/test_ptfile.py
src/Products/PageTemplates/tests/test_ptfile.py
+6
-6
No files found.
src/Products/Five/browser/tests/pages.txt
View file @
94dc3d49
...
@@ -41,7 +41,7 @@ A browser page that is a Page Template.
...
@@ -41,7 +41,7 @@ A browser page that is a Page Template.
>>> view = self.folder.unrestrictedTraverse('testoid/owl.html')
>>> view = self.folder.unrestrictedTraverse('testoid/owl.html')
>>> view()
>>> view()
u'<p>2</p>
\n
'
u'<p>2</p>'
A browser page that is a PageTemplate plus a view class:
A browser page that is a PageTemplate plus a view class:
...
@@ -49,7 +49,7 @@ A browser page that is a PageTemplate plus a view class:
...
@@ -49,7 +49,7 @@ A browser page that is a PageTemplate plus a view class:
>>> isinstance(view, SimpleView)
>>> isinstance(view, SimpleView)
True
True
>>> view()
>>> view()
u'<p>The falcon has taken flight</p>
\n
'
u'<p>The falcon has taken flight</p>'
Test pages that have been registered through the cumulative
Test pages that have been registered through the cumulative
<browser:pages> directive:
<browser:pages> directive:
...
...
src/Products/PageTemplates/tests/testZopePageTemplate.py
View file @
94dc3d49
...
@@ -210,9 +210,9 @@ class ZPTUnicodeEncodingConflictResolution(ZopeTestCase):
...
@@ -210,9 +210,9 @@ class ZPTUnicodeEncodingConflictResolution(ZopeTestCase):
zpt
=
self
.
app
[
'test'
]
zpt
=
self
.
app
[
'test'
]
from
zope.publisher.base
import
DebugFlags
from
zope.publisher.base
import
DebugFlags
self
.
app
.
REQUEST
.
debug
=
DebugFlags
()
self
.
app
.
REQUEST
.
debug
=
DebugFlags
()
self
.
assertEqual
(
zpt
.
pt_render
(),
unicode
(
'<div>foo</div>
\
n
'
))
self
.
assertEqual
(
zpt
.
pt_render
(),
unicode
(
'<div>foo</div>'
))
self
.
app
.
REQUEST
.
debug
.
showTAL
=
True
self
.
app
.
REQUEST
.
debug
.
showTAL
=
True
self
.
assertEqual
(
zpt
.
pt_render
(),
unicode
(
'<div tal:content="string:foo">foo</div>
\
n
'
))
self
.
assertEqual
(
zpt
.
pt_render
(),
unicode
(
'<div tal:content="string:foo">foo</div>'
))
self
.
app
.
REQUEST
.
debug
.
sourceAnnotations
=
True
self
.
app
.
REQUEST
.
debug
.
sourceAnnotations
=
True
self
.
assertEqual
(
zpt
.
pt_render
().
startswith
(
unicode
(
'<!--'
)),
True
)
self
.
assertEqual
(
zpt
.
pt_render
().
startswith
(
unicode
(
'<!--'
)),
True
)
...
...
src/Products/PageTemplates/tests/test_ptfile.py
View file @
94dc3d49
...
@@ -163,7 +163,7 @@ class LineEndingsTestCase(unittest.TestCase):
...
@@ -163,7 +163,7 @@ class LineEndingsTestCase(unittest.TestCase):
''' 'bar','''
,
''' 'bar','''
,
''' 'spam','''
,
''' 'spam','''
,
''' 'eggs'))"></html>'''
)
''' 'eggs'))"></html>'''
)
OUTPUT
=
'foo bar spam eggs
\
n
'
OUTPUT
=
'foo bar spam eggs'
def
setUp
(
self
):
def
setUp
(
self
):
transaction
.
begin
()
transaction
.
begin
()
...
@@ -187,10 +187,10 @@ class LineEndingsTestCase(unittest.TestCase):
...
@@ -187,10 +187,10 @@ class LineEndingsTestCase(unittest.TestCase):
self
.
assertEqual
(
self
.
runPTWithLineEndings
(),
self
.
OUTPUT
)
self
.
assertEqual
(
self
.
runPTWithLineEndings
(),
self
.
OUTPUT
)
def
test_dos
(
self
):
def
test_dos
(
self
):
self
.
assertEqual
(
self
.
runPTWithLineEndings
(
'
\
r
\
n
'
),
self
.
OUTPUT
)
self
.
assertEqual
(
self
.
runPTWithLineEndings
(),
self
.
OUTPUT
)
def
test_mac
(
self
):
def
test_mac
(
self
):
self
.
assertEqual
(
self
.
runPTWithLineEndings
(
'
\
r
'
),
self
.
OUTPUT
)
self
.
assertEqual
(
self
.
runPTWithLineEndings
(),
self
.
OUTPUT
)
class
LazyLoadingTestCase
(
unittest
.
TestCase
):
class
LazyLoadingTestCase
(
unittest
.
TestCase
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment