X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Ftransportpce_tests%2F2.2.1%2Ftest10_tapi.py;h=6721a3501df59c841c9541d2c71e8020b6b745c3;hb=7ecb4bf912a8555f88b07da62fcec106b6311a54;hp=25a09c2b29b2176749a0595a1ea3439b1cbf5f04;hpb=3cdd5c2add69a549b716630033801d7084664111;p=transportpce.git diff --git a/tests/transportpce_tests/2.2.1/test10_tapi.py b/tests/transportpce_tests/2.2.1/test10_tapi.py index 25a09c2b2..6721a3501 100644 --- a/tests/transportpce_tests/2.2.1/test10_tapi.py +++ b/tests/transportpce_tests/2.2.1/test10_tapi.py @@ -236,7 +236,7 @@ class TransportTapitesting(unittest.TestCase): response = test_utils.post_request(url, data) self.assertEqual(response.status_code, requests.codes.ok, test_utils.CODE_SHOULD_BE_200) res = response.json() - self.assertNotIn("node", res["output"]["topology"], 'Topology should contain no node') + self.assertEqual(len(res["output"]["topology"]["node"]), 1, 'Topology should contain 1 node') self.assertNotIn("link", res["output"]["topology"], 'Topology should contain no link') def test_05_disconnect_roadmb(self): @@ -250,7 +250,17 @@ class TransportTapitesting(unittest.TestCase): time.sleep(10) def test_07_check_tapi_topos(self): - self.test_04_check_tapi_topos() + url = "{}/operations/tapi-topology:get-topology-details" + data = { + "tapi-topology:input": { + "tapi-topology:topology-id-or-name": "T0 - Multi-layer topology" + } + } + response = test_utils.post_request(url, data) + self.assertEqual(response.status_code, requests.codes.ok, test_utils.CODE_SHOULD_BE_200) + res = response.json() + self.assertNotIn("node", res["output"]["topology"], 'Topology should contain no node') + self.assertNotIn("link", res["output"]["topology"], 'Topology should contain no link') def test_08_connect_rdma(self): response = test_utils.mount_device("ROADM-A1", ('roadma', self.NODE_VERSION))