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
1c131fc8
Commit
1c131fc8
authored
Aug 08, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid having a resource directory and a Python module of the same name
parent
206bd882
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
src/Products/Five/browser/tests/pages.zcml
src/Products/Five/browser/tests/pages.zcml
+1
-1
src/Products/Five/browser/tests/templates/dirpage1.pt
src/Products/Five/browser/tests/templates/dirpage1.pt
+0
-0
src/Products/Five/browser/tests/templates/dirpage2.pt
src/Products/Five/browser/tests/templates/dirpage2.pt
+0
-0
src/Products/Five/browser/tests/test_pagetemplatefile.py
src/Products/Five/browser/tests/test_pagetemplatefile.py
+4
-4
No files found.
src/Products/Five/browser/tests/pages.zcml
View file @
1c131fc8
...
@@ -193,7 +193,7 @@
...
@@ -193,7 +193,7 @@
<five:pagesFromDirectory
<five:pagesFromDirectory
for="Products.Five.tests.testing.simplecontent.ISimpleContent"
for="Products.Five.tests.testing.simplecontent.ISimpleContent"
module="Products.Five.browser.tests"
module="Products.Five.browser.tests"
directory="
pag
es"
directory="
templat
es"
permission="zope2.Public"
permission="zope2.Public"
/>
/>
...
...
src/Products/Five/browser/tests/
pag
es/dirpage1.pt
→
src/Products/Five/browser/tests/
templat
es/dirpage1.pt
View file @
1c131fc8
File moved
src/Products/Five/browser/tests/
pag
es/dirpage2.pt
→
src/Products/Five/browser/tests/
templat
es/dirpage2.pt
View file @
1c131fc8
File moved
src/Products/Five/browser/tests/test_pagetemplatefile.py
View file @
1c131fc8
...
@@ -30,7 +30,7 @@ class ViewPageTemplateFileTests(unittest.TestCase):
...
@@ -30,7 +30,7 @@ class ViewPageTemplateFileTests(unittest.TestCase):
self
.
assertEqual
(
vptf
.
id
,
'seagull.pt'
)
self
.
assertEqual
(
vptf
.
id
,
'seagull.pt'
)
def
test_getId_with_path
(
self
):
def
test_getId_with_path
(
self
):
vptf
=
self
.
_makeOne
(
'
pag
es/dirpage1.pt'
)
vptf
=
self
.
_makeOne
(
'
templat
es/dirpage1.pt'
)
self
.
assertEqual
(
vptf
.
id
,
'dirpage1.pt'
)
self
.
assertEqual
(
vptf
.
id
,
'dirpage1.pt'
)
def
test_pt_getEngine
(
self
):
def
test_pt_getEngine
(
self
):
...
@@ -139,7 +139,7 @@ class ViewPageTemplateFileTests(unittest.TestCase):
...
@@ -139,7 +139,7 @@ class ViewPageTemplateFileTests(unittest.TestCase):
request
=
DummyRequest
()
request
=
DummyRequest
()
response
=
request
.
response
=
DummyResponse
()
response
=
request
.
response
=
DummyResponse
()
view
=
self
.
_makeView
(
context
,
request
)
view
=
self
.
_makeView
(
context
,
request
)
vptf
=
self
.
_makeOne
(
'
pag
es/dirpage1.pt'
)
vptf
=
self
.
_makeOne
(
'
templat
es/dirpage1.pt'
)
body
=
vptf
(
view
)
body
=
vptf
(
view
)
self
.
assertEqual
(
body
,
DIRPAGE1
)
self
.
assertEqual
(
body
,
DIRPAGE1
)
self
.
assertEqual
(
response
.
_headers
[
'Content-Type'
],
'text/html'
)
self
.
assertEqual
(
response
.
_headers
[
'Content-Type'
],
'text/html'
)
...
@@ -150,13 +150,13 @@ class ViewPageTemplateFileTests(unittest.TestCase):
...
@@ -150,13 +150,13 @@ class ViewPageTemplateFileTests(unittest.TestCase):
response
=
request
.
response
=
DummyResponse
(
response
=
request
.
response
=
DummyResponse
(
{
'Content-Type'
:
'text/xhtml'
})
{
'Content-Type'
:
'text/xhtml'
})
view
=
self
.
_makeView
(
context
,
request
)
view
=
self
.
_makeView
(
context
,
request
)
vptf
=
self
.
_makeOne
(
'
pag
es/dirpage1.pt'
)
vptf
=
self
.
_makeOne
(
'
templat
es/dirpage1.pt'
)
body
=
vptf
(
view
)
body
=
vptf
(
view
)
self
.
assertEqual
(
response
.
_headers
[
'Content-Type'
],
'text/xhtml'
)
self
.
assertEqual
(
response
.
_headers
[
'Content-Type'
],
'text/xhtml'
)
def
test___get___
(
self
):
def
test___get___
(
self
):
from
Products.Five.browser.pagetemplatefile
import
BoundPageTemplate
from
Products.Five.browser.pagetemplatefile
import
BoundPageTemplate
template
=
self
.
_makeOne
(
'
pag
es/dirpage1.pt'
)
template
=
self
.
_makeOne
(
'
templat
es/dirpage1.pt'
)
class
Foo
:
class
Foo
:
def
__init__
(
self
,
context
,
request
):
def
__init__
(
self
,
context
,
request
):
self
.
context
=
context
self
.
context
=
context
...
...
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