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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
erp5
Commits
1b8e5522
Commit
1b8e5522
authored
Feb 09, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core_test: py3
parent
c4e0f871
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testBase.py
.../TestTemplateItem/portal_components/test.erp5.testBase.py
+5
-6
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testQueryModule.py
...mplateItem/portal_components/test.erp5.testQueryModule.py
+1
-1
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testBase.py
View file @
1b8e5522
...
...
@@ -28,6 +28,7 @@
#
##############################################################################
import
io
import
unittest
import
os
from
unittest
import
skip
...
...
@@ -1050,14 +1051,12 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
import
Products.ERP5Type
# tests that members can download files
class
DummyFile
(
file
):
def
__init__
(
self
,
filename
):
self
.
filename
=
os
.
path
.
basename
(
filename
)
file
.
__init__
(
self
,
filename
)
portal
=
self
.
getPortal
()
class
DummyFile
(
io
.
BytesIO
):
filename
=
'dummy.txt'
portal
=
self
.
portal
organisation
=
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
file_document
=
organisation
.
newContent
(
portal_type
=
'Embedded File'
,
file
=
DummyFile
(
Products
.
ERP5Type
.
__file__
),
file
=
DummyFile
(
b"data"
),
content_type
=
'text/plain'
)
# login as a member
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testQueryModule.py
View file @
1b8e5522
...
...
@@ -129,7 +129,7 @@ class TestQueryModule(ERP5TypeTestCase):
mfrom
,
mto
,
messageText
=
last_message
self
.
assertEqual
(
'owner_user@example.invalid'
,
mfrom
)
self
.
assertEqual
([
'question_user@example.invalid'
],
mto
)
self
.
assert
True
(
'Query'
in
messageText
,
messageText
)
self
.
assert
In
(
b'Query'
,
messageText
)
def
test_suite
():
...
...
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