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
b7c832db
Commit
b7c832db
authored
Oct 29, 2024
by
Paul Graydon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wendelin_telecom_test: Update tests
parent
9ff9bdc6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
12 deletions
+25
-12
bt5/wendelin_telecom_test/TestTemplateItem/portal_components/test.erp5.testWendelinTelecom.py
...teItem/portal_components/test.erp5.testWendelinTelecom.py
+25
-12
No files found.
bt5/wendelin_telecom_test/TestTemplateItem/portal_components/test.erp5.testWendelinTelecom.py
View file @
b7c832db
...
@@ -499,9 +499,13 @@ class WendelinTelecomTest(SecurityTestCase):
...
@@ -499,9 +499,13 @@ class WendelinTelecomTest(SecurityTestCase):
tag_enb_id_seed
=
tag_enb_id_seed
tag_enb_id_seed
=
tag_enb_id_seed
)
)
# Parse the JSON response and check that it i
s empty, indicating
a success
# Parse the JSON response and check that it i
ndicates
a success
response_dict
=
json
.
loads
(
ors_item_dict
[
'response'
])
response_dict
=
json
.
loads
(
ors_item_dict
[
'response'
])
self
.
assertTrue
(
response_dict
==
{})
self
.
assertTrue
(
response_dict
[
'status'
]
==
"ok"
)
self
.
assertTrue
(
response_dict
[
'message'
]
==
"ORS with tag %s successfully registered."
\
%
ors_item_dict
[
'data_acquisition_unit'
].
getReference
()
)
# Check that the Data Acquisition Unit and Data Supply have been created
# Check that the Data Acquisition Unit and Data Supply have been created
self
.
assertTrue
(
ors_item_dict
[
'data_acquisition_unit'
]
is
not
None
)
self
.
assertTrue
(
ors_item_dict
[
'data_acquisition_unit'
]
is
not
None
)
...
@@ -515,10 +519,13 @@ class WendelinTelecomTest(SecurityTestCase):
...
@@ -515,10 +519,13 @@ class WendelinTelecomTest(SecurityTestCase):
tag_enb_id_seed
=
tag_enb_id_seed
tag_enb_id_seed
=
tag_enb_id_seed
)
)
# Parse the JSON response and check the
error
message
# Parse the JSON response and check the
status and
message
response_dict
=
json
.
loads
(
repeated_ors_item_dict
[
'response'
])
response_dict
=
json
.
loads
(
repeated_ors_item_dict
[
'response'
])
self
.
assertTrue
(
'error_msg'
in
response_dict
)
self
.
assertTrue
(
response_dict
[
'status'
]
==
"ok"
)
self
.
assertTrue
(
response_dict
[
'error_msg'
]
==
"ORS with tag %s already exists."
%
ors_item_dict
[
'data_acquisition_unit'
].
getReference
())
self
.
assertTrue
(
response_dict
[
'message'
]
==
"ORS with tag %s already exists."
\
%
ors_item_dict
[
'data_acquisition_unit'
].
getReference
()
)
# Now, link the original Data Supply to a client project
# Now, link the original Data Supply to a client project
project_a_item_dict
=
self
.
registerOrsClientProject
()
project_a_item_dict
=
self
.
registerOrsClientProject
()
...
@@ -572,9 +579,13 @@ class WendelinTelecomTest(SecurityTestCase):
...
@@ -572,9 +579,13 @@ class WendelinTelecomTest(SecurityTestCase):
tag_enb_id_seed
=
''
tag_enb_id_seed
=
''
)
)
# Parse the JSON response and check that it i
s empty, indicating
a success
# Parse the JSON response and check that it i
ndicates
a success
response_dict
=
json
.
loads
(
no_enb_id_ors_item_dict
[
'response'
])
response_dict
=
json
.
loads
(
no_enb_id_ors_item_dict
[
'response'
])
self
.
assertTrue
(
response_dict
==
{})
self
.
assertTrue
(
response_dict
[
'status'
]
==
"ok"
)
self
.
assertTrue
(
response_dict
[
'message'
]
==
"ORS with tag %s successfully registered."
\
%
no_enb_id_ors_item_dict
[
'data_acquisition_unit'
].
getReference
()
)
# Check that the Data Acquisition Unit and Data Supply have been created
# Check that the Data Acquisition Unit and Data Supply have been created
self
.
assertTrue
(
no_enb_id_ors_item_dict
[
'data_acquisition_unit'
]
is
not
None
)
self
.
assertTrue
(
no_enb_id_ors_item_dict
[
'data_acquisition_unit'
]
is
not
None
)
...
@@ -602,9 +613,11 @@ class WendelinTelecomTest(SecurityTestCase):
...
@@ -602,9 +613,11 @@ class WendelinTelecomTest(SecurityTestCase):
# Parse the JSON response and check the error message
# Parse the JSON response and check the error message
response_dict
=
json
.
loads
(
too_long_tag_ors_item_dict
[
'response'
])
response_dict
=
json
.
loads
(
too_long_tag_ors_item_dict
[
'response'
])
self
.
assertTrue
(
'error_msg'
in
response_dict
)
self
.
assertTrue
(
response_dict
[
'status'
]
==
"error"
)
self
.
assertTrue
(
response_dict
[
'error_msg'
]
==
"Invalid ORS tag ors%s_COMP-%s_e0x%sTest found"
\
self
.
assertTrue
(
%
(
too_long_tag_hostname_seed
,
tag_comp_id_seed
,
tag_enb_id_seed
))
response_dict
[
'message'
]
==
"Invalid ORS tag ors%s_COMP-%s_e0x%sTest found"
\
%
(
too_long_tag_hostname_seed
,
tag_comp_id_seed
,
tag_enb_id_seed
)
)
# Check that the Data Acquisition Unit and Data Supply have NOT been created
# Check that the Data Acquisition Unit and Data Supply have NOT been created
self
.
assertTrue
(
too_long_tag_ors_item_dict
[
'data_acquisition_unit'
]
is
None
)
self
.
assertTrue
(
too_long_tag_ors_item_dict
[
'data_acquisition_unit'
]
is
None
)
...
@@ -620,8 +633,8 @@ class WendelinTelecomTest(SecurityTestCase):
...
@@ -620,8 +633,8 @@ class WendelinTelecomTest(SecurityTestCase):
# Parse the JSON response and check the error message
# Parse the JSON response and check the error message
response_dict
=
json
.
loads
(
too_long_tag_ors_item_dict
[
'response'
])
response_dict
=
json
.
loads
(
too_long_tag_ors_item_dict
[
'response'
])
self
.
assertTrue
(
'error_msg'
in
response_dict
)
self
.
assertTrue
(
response_dict
[
'status'
]
==
"error"
)
self
.
assertTrue
(
response_dict
[
'
error_msg
'
]
==
"Invalid ORS tag ors%sTest found"
%
tag_hostname_seed
)
self
.
assertTrue
(
response_dict
[
'
message
'
]
==
"Invalid ORS tag ors%sTest found"
%
tag_hostname_seed
)
# Check that the Data Acquisition Unit and Data Supply have NOT been created
# Check that the Data Acquisition Unit and Data Supply have NOT been created
self
.
assertTrue
(
too_long_tag_ors_item_dict
[
'data_acquisition_unit'
]
is
None
)
self
.
assertTrue
(
too_long_tag_ors_item_dict
[
'data_acquisition_unit'
]
is
None
)
...
...
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