diff options
author | Stavros Kanarakis <stavros.kanarakis@nokia.com> | 2020-03-03 13:47:45 +0200 |
---|---|---|
committer | Stavros Kanarakis <stavros.kanarakis@nokia.com> | 2020-03-03 13:51:22 +0200 |
commit | 9f330c25a03f90ae1ced491d36d1314463e6f6a4 (patch) | |
tree | 33d5b451c2d0588b1b68c4ebc68839b4cc083b9d /tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py | |
parent | f3f1b5e5f426fc181d25061cef39429b9498106f (diff) |
Align BBS-ep CSIT tests with latest code changes (DCAE-SDK upgrade)
Issue-ID: DCAEGEN2-2105
Signed-off-by: Stavros Kanarakis <stavros.kanarakis@nokia.com>
Change-Id: I5d23ffff7e6c21bbd85eaa54147053d5d5893ec2
Diffstat (limited to 'tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py')
-rw-r--r-- | tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py b/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py index 8dbdc5a3..c58e67e2 100644 --- a/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py +++ b/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py @@ -40,7 +40,8 @@ class BbsLibrary(object): Get the correlationId, oldState, newState, stateInterface, macAddress, swVersion elements from the invalid message and place the elements into a JSON object (string) as fields for comparision """ - json_to_python = json.loads(json_file) + eventString = json.loads(json_file)[0] + json_to_python = json.loads(eventString.replace("\\", "")) correlation_id = json_to_python.get("event").get("commonEventHeader").get("sourceName") oldState = json_to_python.get("event").get("stateChangeFields").get("oldState") newState = json_to_python.get("event").get("stateChangeFields").get("newState") @@ -73,7 +74,8 @@ class BbsLibrary(object): Get the correlationId, attachment-point, remote-id, cvlan, svlan, elements from the invalid message and place the elements into a JSON object (string) as fields for comparision """ - json_to_python = json.loads(json_file) + eventString = json.loads(json_file)[0] + json_to_python = json.loads(eventString.replace("\\", "")) correlation_id = json_to_python.get("correlationId") attachmentPoint = json_to_python.get("additionalFields").get("attachment-point") remoteId = json_to_python.get("additionalFields").get("remote-id") @@ -109,7 +111,7 @@ class BbsLibrary(object): python_dmaap_policy = "" try: - d_policy = python_dmaap_policy.get("policyName") + d_policy = python_dmaap_policy[0].get("policyName") except: d_policy = "" |