Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
Matevz Golob
wendelin
Commits
bc825ce5
Commit
bc825ce5
authored
Jun 02, 2015
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try sample transformation
parent
01ba8bf0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
bt5/erp5_wendelin/TestTemplateItem/portal_components/test.erp5.testWendelin.py
...tTemplateItem/portal_components/test.erp5.testWendelin.py
+22
-3
bt5/erp5_wendelin/TestTemplateItem/portal_components/test.erp5.testWendelin.xml
...TemplateItem/portal_components/test.erp5.testWendelin.xml
+1
-0
No files found.
bt5/erp5_wendelin/TestTemplateItem/portal_components/test.erp5.testWendelin.py
View file @
bc825ce5
...
@@ -52,7 +52,8 @@ class Test(ERP5TypeTestCase):
...
@@ -52,7 +52,8 @@ class Test(ERP5TypeTestCase):
"""
"""
import
scipy
import
scipy
import
sklearn
import
sklearn
def
test_01_IngestionFfromFluentd
(
self
):
def
test_01_IngestionFromFluentd
(
self
):
"""
"""
Test ingestion using a POST Request containing a msgpack encoded message
Test ingestion using a POST Request containing a msgpack encoded message
simulating input from fluentd
simulating input from fluentd
...
@@ -67,9 +68,19 @@ class Test(ERP5TypeTestCase):
...
@@ -67,9 +68,19 @@ class Test(ERP5TypeTestCase):
request
.
set
(
'reference'
,
'car'
)
request
.
set
(
'reference'
,
'car'
)
request
.
set
(
'data_chunk'
,
data_chunk
)
request
.
set
(
'data_chunk'
,
data_chunk
)
# create new Data Stream for test purposes
data_stream
=
portal
.
data_stream_module
.
newContent
(
\
portal_type
=
'Data Stream'
,
\
reference
=
'car'
)
data_stream
.
validate
()
# asssign it to Data Supply
data_supply_line
=
portal
.
restrictedTraverse
(
'data_supply_module/wendelin_3/1'
)
data_supply_line
.
setDestinationSectionValue
(
data_stream
)
self
.
tic
()
# do real ingestion call
# do real ingestion call
portal
.
portal_ingestion_policies
.
wendelin_car_logs
.
ingest
()
portal
.
portal_ingestion_policies
.
wendelin_car_logs
.
ingest
()
data_stream
=
portal
.
data_stream_module
.
wendelin_22
# ingestion handler script saves new data using new line so we
# ingestion handler script saves new data using new line so we
# need to remove it, it also stringifies thus we need to
# need to remove it, it also stringifies thus we need to
...
@@ -77,7 +88,15 @@ class Test(ERP5TypeTestCase):
...
@@ -77,7 +88,15 @@ class Test(ERP5TypeTestCase):
data_stream_data
=
data_stream_data
.
replace
(
'
\
n
'
,
''
)
data_stream_data
=
data_stream_data
.
replace
(
'
\
n
'
,
''
)
self
.
assertEqual
(
str
(
real_data_dictionary
),
data_stream_data
)
self
.
assertEqual
(
str
(
real_data_dictionary
),
data_stream_data
)
# XXX: try sample transformation
# try sample transformation
reference
=
'test-data-array'
data_array
=
portal
.
data_array_module
.
newContent
(
portal_type
=
'Data Array'
,
reference
=
reference
)
data_stream
.
DataStream_transform
(
\
chunk_length
=
10
,
\
transform_script_id
=
'DataStream_convertoNumpyArray'
,
data_array_reference
=
reference
)
def
test_02_Transformations
(
self
):
def
test_02_Transformations
(
self
):
"""
"""
...
...
bt5/erp5_wendelin/TestTemplateItem/portal_components/test.erp5.testWendelin.xml
View file @
bc825ce5
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
<tuple>
<tuple>
<string>
W: 53, 4: Unused variable \'scipy\' (unused-variable)
</string>
<string>
W: 53, 4: Unused variable \'scipy\' (unused-variable)
</string>
<string>
W: 54, 4: Unused variable \'sklearn\' (unused-variable)
</string>
<string>
W: 54, 4: Unused variable \'sklearn\' (unused-variable)
</string>
<string>
W: 93, 4: Unused variable \'data_array\' (unused-variable)
</string>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
...
...
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