Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
139
Merge Requests
139
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
03a62c67
Commit
03a62c67
authored
Apr 04, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! fixup! web_shadir: PY3 compatibility
parent
e7335b91
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
bt5/erp5_web_shadir/ExtensionTemplateItem/portal_components/extension.erp5.ShaDir.py
...onTemplateItem/portal_components/extension.erp5.ShaDir.py
+6
-1
bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.testShaDir.py
...estTemplateItem/portal_components/test.erp5.testShaDir.py
+2
-0
No files found.
bt5/erp5_web_shadir/ExtensionTemplateItem/portal_components/extension.erp5.ShaDir.py
View file @
03a62c67
...
...
@@ -130,7 +130,12 @@ def WebSection_putFactory(self, name, typ, body):
filename
=
name
,
discover_metadata
=
False
)
return
document
.
asContext
(
id
=
name
)
# return a document for which getId() returns the name for _setObject to be
# called with id=name ( for WebSection_setObject ), but for which
# getRelativeUrl returns the relative url of the real document, for
# VirtualFolderMixin transactional variable cache between _setObject and
# _getOb
return
document
.
asContext
(
getId
=
lambda
:
name
)
# The following scripts are helpers to search & clean up shadir entries.
# XXX: Due to lack of View skin for shadir, external methods are currently
...
...
bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.testShaDir.py
View file @
03a62c67
...
...
@@ -107,6 +107,7 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
self
.
assertEqual
(
self
.
key
,
data_set
.
getReference
())
self
.
assertNotEqual
(
self
.
key
,
data_set
.
getId
())
self
.
assertEqual
(
'published'
,
data_set
.
getValidationState
())
self
.
assertEqual
(
len
(
self
.
portal
.
data_set_module
.
contentValues
()),
1
)
# Asserting Document
document
=
self
.
portal
.
portal_catalog
.
getResultValue
(
...
...
@@ -120,6 +121,7 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
str
(
document
.
getExpirationDate
()))
self
.
assertEqual
(
'application/json'
,
document
.
getContentType
())
self
.
assertEqual
(
'Published'
,
document
.
getValidationStateTitle
())
self
.
assertEqual
(
len
(
self
.
portal
.
document_module
.
contentValues
()),
1
)
def
test_get_information
(
self
):
"""
...
...
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