aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMariusz Wagner <mariusz.wagner@nokia.com>2019-04-08 10:59:22 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-08 10:59:22 +0000
commit4f2fd0b8bd864b2441609ee6048ce841e05bff6b (patch)
treececfb6e9c90257248c0f5304001be21d50ce37a6
parent4383e071691b7147dbf31cca7500489d82ec49a6 (diff)
parent69d689ac904c2874beed030e1c7ff3e5e7e4c78c (diff)
Merge "Fix AAI simulator"
-rw-r--r--.gitignore1
-rw-r--r--tests/dcaegen2/prh-testcases/resources/simulator/AAI.py6
2 files changed, 4 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 674baf5b..5ba8f9a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,5 +22,6 @@ env.properties
.DS_Store
.idea
*.iml
+*.pyc
/bin/
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
index 27883655..baa81651 100644
--- a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
@@ -29,10 +29,10 @@ class AAISetup(BaseHTTPRequestHandler):
def do_PUT(self):
logger.info('AAI SIM Setup Put execution')
- if re.search('/set_pnf', self.path):
+ if re.search('/set_pnf$', self.path): # to avoid regex collisions '$' must be added
global pnf_name
content_length = self._get_content_length()
- pnf_name = self.rfile.read(content_length)
+ pnf_name = self.rfile.read(content_length).decode()
_mark_response_as_http_ok(self)
if re.search('/set_pnf_entry',self.path):
@@ -94,4 +94,4 @@ def _main_(handler_class=AAIHandler, protocol="HTTP/1.0"):
if __name__ == '__main__':
- _main_()
+ _main_() \ No newline at end of file