aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mocks/prov-mns-provider/src/ProvMnSProvider.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/mocks/prov-mns-provider/src/ProvMnSProvider.py b/test/mocks/prov-mns-provider/src/ProvMnSProvider.py
index e9d488ede..da445e223 100644
--- a/test/mocks/prov-mns-provider/src/ProvMnSProvider.py
+++ b/test/mocks/prov-mns-provider/src/ProvMnSProvider.py
@@ -83,10 +83,11 @@ class ServerHTTP(BaseHTTPRequestHandler):
print("Fail to get MOI object: "+'/' +className+'/'+idName)
self.send_response(406)
else:
- self.send_response(401)
if prefix_check is True:
+ self.send_response(401)
response['error'] = {"errorInfo":"not Authorized"}
else:
+ self.send_response(404)
response['error'] = {"errorInfo":"wrong prefix"}
self.send_header("Content-type","application/json")
self.end_headers()
@@ -151,10 +152,11 @@ class ServerHTTP(BaseHTTPRequestHandler):
print("Fail to modify MOI object: "+'/' +className+'/'+idName)
self.send_response(406)
else:
- self.send_response(401)
if prefix_check is True:
+ self.send_response(401)
response['error'] = {"errorInfo":"not Authorized"}
else:
+ self.send_response(404)
response['error'] = {"errorInfo":"wrong prefix"}
self.send_header("Content-type","application/json")
self.end_headers()
@@ -203,10 +205,11 @@ class ServerHTTP(BaseHTTPRequestHandler):
print("Fail to delete MOI object: "+'/' +className+'/'+idName)
self.send_response(406)
else:
- self.send_response(401)
if prefix_check is True:
+ self.send_response(401)
response['error'] = {"errorInfo":"not Authorized"}
else:
+ self.send_response(404)
response['error'] = {"errorInfo":"wrong prefix"}
self.send_header("Content-type","application/json")
self.end_headers()
@@ -252,10 +255,11 @@ class ServerHTTP(BaseHTTPRequestHandler):
print("Fail to create MOI object: "+'/' +className+'/'+idName)
self.send_response(406)
else:
- self.send_response(401)
if prefix_check is True:
+ self.send_response(401)
response['error'] = {"errorInfo":"not Authorized"}
else:
+ self.send_response(404)
response['error'] = {"errorInfo":"wrong prefix"}
self.send_header("Content-type","application/json")
self.end_headers()