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
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
wendelin
Commits
36b9263f
Commit
36b9263f
authored
Jan 15, 2024
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extent tests and add numbering.
parent
d63569f9
Pipeline
#32185
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
bt5/erp5_mqtt/TestTemplateItem/portal_components/test.erp5.testMQTTMessage.py
...mplateItem/portal_components/test.erp5.testMQTTMessage.py
+16
-6
No files found.
bt5/erp5_mqtt/TestTemplateItem/portal_components/test.erp5.testMQTTMessage.py
View file @
36b9263f
...
@@ -106,8 +106,18 @@ class TestDataIngestion(ERP5TypeTestCase):
...
@@ -106,8 +106,18 @@ class TestDataIngestion(ERP5TypeTestCase):
self
.
assertEqual
(
mqtt_message
.
getTitle
(),
topic
)
self
.
assertEqual
(
mqtt_message
.
getTitle
(),
topic
)
self
.
assertEqual
(
mqtt_message
.
getPayload
(),
str
(
payload
))
self
.
assertEqual
(
mqtt_message
.
getPayload
(),
str
(
payload
))
def
test_01_DefaultWendelinConfigurationExistency
(
self
):
"""
Test that nobody accidently removes needed by HowTo's default configurations.
"""
# the default json ingestion is used in HowTo / Docs
self
.
assertNotEqual
(
None
,
getattr
(
self
.
portal
.
portal_ingestion_policies
,
"default_mqtt"
,
None
))
self
.
assertNotEqual
(
None
,
getattr
(
self
.
portal
.
data_supply_module
,
"default_mqtt"
,
None
))
def
test_IngestionFromMQTT
(
self
):
def
test_
02_
IngestionFromMQTT
(
self
):
"""
"""
Test ingestion using a POST Request containing a
Test ingestion using a POST Request containing a
msgpack encoded message simulating input from MQTT.
msgpack encoded message simulating input from MQTT.
...
@@ -123,7 +133,7 @@ class TestDataIngestion(ERP5TypeTestCase):
...
@@ -123,7 +133,7 @@ class TestDataIngestion(ERP5TypeTestCase):
self
.
_assertIngestion
(
topic
,
payload
)
self
.
_assertIngestion
(
topic
,
payload
)
def
test_IngestionFromMQTTWithMultipleMessages
(
self
):
def
test_
03_
IngestionFromMQTTWithMultipleMessages
(
self
):
"""
"""
Test ingestion using a POST Request containing a
Test ingestion using a POST Request containing a
msgpack encoded messages simulating input from MQTT.
msgpack encoded messages simulating input from MQTT.
...
@@ -141,7 +151,7 @@ class TestDataIngestion(ERP5TypeTestCase):
...
@@ -141,7 +151,7 @@ class TestDataIngestion(ERP5TypeTestCase):
self
.
_assertIngestion
(
topic
,
payload
)
self
.
_assertIngestion
(
topic
,
payload
)
def
test_IngestionWithInvalidPolicy
(
self
):
def
test_
04_
IngestionWithInvalidPolicy
(
self
):
"""
"""
Test ingestion using an invalid ingestion policy.
Test ingestion using an invalid ingestion policy.
"""
"""
...
@@ -165,7 +175,7 @@ class TestDataIngestion(ERP5TypeTestCase):
...
@@ -165,7 +175,7 @@ class TestDataIngestion(ERP5TypeTestCase):
self
.
tic
()
self
.
tic
()
def
test_IngestionWithInvalidDataSupply
(
self
):
def
test_
05_
IngestionWithInvalidDataSupply
(
self
):
"""
"""
Test ingestion using an invalid data supply.
Test ingestion using an invalid data supply.
"""
"""
...
@@ -189,7 +199,7 @@ class TestDataIngestion(ERP5TypeTestCase):
...
@@ -189,7 +199,7 @@ class TestDataIngestion(ERP5TypeTestCase):
self
.
tic
()
self
.
tic
()
def
test_IngestionWithInvalidDataProduct
(
self
):
def
test_
06_
IngestionWithInvalidDataProduct
(
self
):
"""
"""
Test ingestion using an invalid data product.
Test ingestion using an invalid data product.
"""
"""
...
@@ -212,7 +222,7 @@ class TestDataIngestion(ERP5TypeTestCase):
...
@@ -212,7 +222,7 @@ class TestDataIngestion(ERP5TypeTestCase):
self
.
assertEqual
(
500
,
response
.
getStatus
())
self
.
assertEqual
(
500
,
response
.
getStatus
())
self
.
tic
()
self
.
tic
()
def
test_MultipleIngestions
(
self
):
def
test_
07_
MultipleIngestions
(
self
):
"""
"""
Test multiple data ingestion requests in succession.
Test multiple data ingestion requests in succession.
"""
"""
...
...
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