Code Review
/
transportpce.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge changes from topic "pylint-issues"
[transportpce.git]
/
tests
/
transportpce_tests
/
1.2.1
/
test_portmapping.py
diff --git
a/tests/transportpce_tests/1.2.1/test_portmapping.py
b/tests/transportpce_tests/1.2.1/test_portmapping.py
index 9bfeb4840f6bec7ef00731ad30fe6096f950f7b5..51694b5683ef88a8eddf2a4c221e381626fd37bd 100644
(file)
--- a/
tests/transportpce_tests/1.2.1/test_portmapping.py
+++ b/
tests/transportpce_tests/1.2.1/test_portmapping.py
@@
-9,6
+9,9
@@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
import unittest
import time
import requests
import unittest
import time
import requests
@@
-26,6
+29,7
@@
class TransportPCEPortMappingTesting(unittest.TestCase):
@classmethod
def tearDownClass(cls):
@classmethod
def tearDownClass(cls):
+ # pylint: disable=not-an-iterable
for process in cls.processes:
test_utils.shutdown_process(process)
print("all processes killed")
for process in cls.processes:
test_utils.shutdown_process(process)
print("all processes killed")
@@
-187,6
+191,7
@@
class TransportPCEPortMappingTesting(unittest.TestCase):
'port-qual': 'xpdr-client', 'lcp-hash-val': 'AO9UFkY/TLYy'},
res['mapping'])
'port-qual': 'xpdr-client', 'lcp-hash-val': 'AO9UFkY/TLYy'},
res['mapping'])
+ def test_15_xpdr_portmapping_CLIENT4(self):
response = test_utils.portmapping_request("XPDRA01/mapping/XPDR1-CLIENT4")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
response = test_utils.portmapping_request("XPDRA01/mapping/XPDR1-CLIENT4")
self.assertEqual(response.status_code, requests.codes.ok)
res = response.json()
@@
-203,7
+208,7
@@
class TransportPCEPortMappingTesting(unittest.TestCase):
def test_17_xpdr_device_disconnected(self):
response = test_utils.get_netconf_oper_request("XPDRA01")
def test_17_xpdr_device_disconnected(self):
response = test_utils.get_netconf_oper_request("XPDRA01")
- self.assertEqual(response.status_code, requests.codes.
not_found
)
+ self.assertEqual(response.status_code, requests.codes.
conflict
)
res = response.json()
self.assertIn(
{"error-type": "application", "error-tag": "data-missing",
res = response.json()
self.assertIn(
{"error-type": "application", "error-tag": "data-missing",
@@
-212,7
+217,7
@@
class TransportPCEPortMappingTesting(unittest.TestCase):
def test_18_xpdr_device_not_connected(self):
response = test_utils.portmapping_request("XPDRA01")
def test_18_xpdr_device_not_connected(self):
response = test_utils.portmapping_request("XPDRA01")
- self.assertEqual(response.status_code, requests.codes.
not_found
)
+ self.assertEqual(response.status_code, requests.codes.
conflict
)
res = response.json()
self.assertIn(
{"error-type": "application", "error-tag": "data-missing",
res = response.json()
self.assertIn(
{"error-type": "application", "error-tag": "data-missing",
@@
-225,7
+230,7
@@
class TransportPCEPortMappingTesting(unittest.TestCase):
def test_20_rdm_device_disconnected(self):
response = test_utils.get_netconf_oper_request("ROADMA01")
def test_20_rdm_device_disconnected(self):
response = test_utils.get_netconf_oper_request("ROADMA01")
- self.assertEqual(response.status_code, requests.codes.
not_found
)
+ self.assertEqual(response.status_code, requests.codes.
conflict
)
res = response.json()
self.assertIn(
{"error-type": "application", "error-tag": "data-missing",
res = response.json()
self.assertIn(
{"error-type": "application", "error-tag": "data-missing",
@@
-234,7
+239,7
@@
class TransportPCEPortMappingTesting(unittest.TestCase):
def test_21_rdm_device_not_connected(self):
response = test_utils.portmapping_request("ROADMA01")
def test_21_rdm_device_not_connected(self):
response = test_utils.portmapping_request("ROADMA01")
- self.assertEqual(response.status_code, requests.codes.
not_found
)
+ self.assertEqual(response.status_code, requests.codes.
conflict
)
res = response.json()
self.assertIn(
{"error-type": "application", "error-tag": "data-missing",
res = response.json()
self.assertIn(
{"error-type": "application", "error-tag": "data-missing",