Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin-telecom
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
wendelin-telecom
Commits
3a0a5eec
Commit
3a0a5eec
authored
Apr 03, 2023
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ors_wendelin_test: test
parent
68776257
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
235 additions
and
26 deletions
+235
-26
bt5/ors_wendelin_test/PathTemplateItem/web_page_module/test_ors_example_log.html
...athTemplateItem/web_page_module/test_ors_example_log.html
+109
-0
bt5/ors_wendelin_test/PathTemplateItem/web_page_module/test_ors_example_log.xml
...PathTemplateItem/web_page_module/test_ors_example_log.xml
+79
-0
bt5/ors_wendelin_test/TestTemplateItem/portal_components/test.erp5.testORSWendelin.py
...mplateItem/portal_components/test.erp5.testORSWendelin.py
+45
-16
bt5/ors_wendelin_test/TestTemplateItem/portal_components/test.erp5.testORSWendelin.xml
...plateItem/portal_components/test.erp5.testORSWendelin.xml
+1
-10
bt5/ors_wendelin_test/bt/template_path_list
bt5/ors_wendelin_test/bt/template_path_list
+1
-0
No files found.
bt5/ors_wendelin_test/PathTemplateItem/web_page_module/test_ors_example_log.html
0 → 100644
View file @
3a0a5eec
This source diff could not be displayed because it is too large. You can
view the blob
instead.
bt5/ors_wendelin_test/PathTemplateItem/web_page_module/test_ors_example_log.xml
0 → 100644
View file @
3a0a5eec
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Page"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test_ors_example_log
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/ors_wendelin_test/TestTemplateItem/portal_components/test.erp5.testORSWendelin.py
View file @
3a0a5eec
...
@@ -19,18 +19,7 @@
...
@@ -19,18 +19,7 @@
# See https://www.nexedi.com/licensing for rationale and options.
# See https://www.nexedi.com/licensing for rationale and options.
#
#
##############################################################################
##############################################################################
from
cStringIO
import
StringIO
import
base64
import
numpy
as
np
import
string
import
random
import
struct
import
urllib
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
wendelin.bigarray.array_zodb
import
ZBigArray
class
ORSWendelinTest
(
ERP5TypeTestCase
):
class
ORSWendelinTest
(
ERP5TypeTestCase
):
...
@@ -41,8 +30,48 @@ class ORSWendelinTest(ERP5TypeTestCase):
...
@@ -41,8 +30,48 @@ class ORSWendelinTest(ERP5TypeTestCase):
def
getTitle
(
self
):
def
getTitle
(
self
):
return
"ORS Wendelin Test"
return
"ORS Wendelin Test"
def
test_01_dummy
(
self
):
def
afterSetUp
(
self
):
"""
test_data_acquisition_unit
=
getattr
(
self
.
portal
.
data_acquisition_unit_module
,
'test_data_acquisition_unit'
,
None
)
Test that we do not load pickles when converting encoded wendelin data to numpy.
if
not
test_data_acquisition_unit
:
"""
test_data_acquisition_unit
=
self
.
portal
.
data_acquisition_unit_module
.
newContent
(
pass
portal_type
=
'Data Acquisition Unit'
,
id
=
'test_data_acquisition_unit'
,
reference
=
'test_data_acquisition_unit'
)
if
test_data_acquisition_unit
.
getValidationState
()
!=
'validated'
:
test_data_acquisition_unit
.
validate
()
data_stream
=
self
.
_getDataStream
(
test_data_acquisition_unit
)
if
data_stream
:
data_stream
.
setData
(
None
)
self
.
test_data_acquisition_unit
=
test_data_acquisition_unit
self
.
test_ors_example_log
=
self
.
portal
.
web_page_module
.
test_ors_example_log
self
.
tic
()
def
_getDataStream
(
self
,
obj
):
for
line
in
obj
.
getAggregateRelatedValueList
(
portal_type
=
'Data Ingestion Line'
):
data_stream
=
line
.
getAggregateValue
(
portal_type
=
'Data Stream'
)
if
data_stream
:
return
data_stream
def
_ingestData
(
self
,
reference
,
data
):
request
=
self
.
portal
.
REQUEST
request
.
environ
[
"REQUEST_METHOD"
]
=
'POST'
request
.
set
(
'reference'
,
reference
)
request
.
set
(
'data_chunk'
,
data
)
self
.
portal
.
portal_ingestion_policies
.
ors_ingestion
.
ingest
()
self
.
tic
()
def
test_ingestion
(
self
):
data_supply
=
self
.
test_data_acquisition_unit
.
DataAcquisitionUnit_createORSDataSupply
(
batch
=
1
)
self
.
tic
()
self
.
assertEqual
(
data_supply
.
getValidationState
(),
'validated'
)
self
.
_ingestData
(
data_supply
.
getReference
(),
self
.
test_ors_example_log
.
getTextContent
())
self
.
tic
()
data_stream
=
self
.
_getDataStream
(
self
.
test_data_acquisition_unit
)
self
.
assertTrue
(
data_stream
.
getData
()
is
not
None
)
def
test_transformation
(
self
):
pass
\ No newline at end of file
bt5/ors_wendelin_test/TestTemplateItem/portal_components/test.erp5.testORSWendelin.xml
View file @
3a0a5eec
...
@@ -45,16 +45,7 @@
...
@@ -45,16 +45,7 @@
<item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<value>
<tuple>
<tuple/>
<string>
W: 23, 0: Unused StringIO imported from cStringIO (unused-import)
</string>
<string>
W: 24, 0: Unused import base64 (unused-import)
</string>
<string>
W: 25, 0: Unused numpy imported as np (unused-import)
</string>
<string>
W: 26, 0: Unused import string (unused-import)
</string>
<string>
W: 27, 0: Unused import random (unused-import)
</string>
<string>
W: 28, 0: Unused import struct (unused-import)
</string>
<string>
W: 29, 0: Unused import urllib (unused-import)
</string>
<string>
W: 33, 0: Unused ZBigArray imported from wendelin.bigarray.array_zodb (unused-import)
</string>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
...
...
bt5/ors_wendelin_test/bt/template_path_list
0 → 100644
View file @
3a0a5eec
web_page_module/test_ors_example_log
\ No newline at end of file
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