aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mocks/prov-mns-provider/src/test_mns.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/mocks/prov-mns-provider/src/test_mns.py b/test/mocks/prov-mns-provider/src/test_mns.py
index 1ae88e8ce..53a984738 100644
--- a/test/mocks/prov-mns-provider/src/test_mns.py
+++ b/test/mocks/prov-mns-provider/src/test_mns.py
@@ -10,6 +10,7 @@ logger = logging.getLogger(__name__)
MOI_ID = str(uuid4())
MOI_CLASS = ProvMnSProvider.Cretaed_MOIs_list[0]['class']
MOI_DATA_TMPL = { 'data': ProvMnSProvider.Cretaed_MOIs_list[0] }
+MOI_DATA_PATCH = { "data": { "pLMNId": "xxx", "gNBId": "1234", "gNBIdLength": "4" }}
URI_SCHEMA = 'http'
AUTH_STRING = (ProvMnSProvider.username, ProvMnSProvider.password)
URI_BASE_STRING = URI_SCHEMA + '://' + ProvMnSProvider.ipAddress + ':' + \
@@ -47,3 +48,27 @@ def test_get():
logger.debug('Response content: {0}'.format(req_get.text))
assert req_get.status_code == requests.codes.ok
+
+def test_patch():
+ '''Validate PATCH request'''
+
+ req_patch = requests.patch('{0}'.format(URI_PATCH_STRING),
+ auth=AUTH_STRING, json=MOI_DATA_PATCH)
+
+ if req_patch.status_code != requests.codes.ok:
+ logger.error('PATCH request to {0} failed'.format(URI_PATCH_STRING))
+ logger.debug('Response content: {0}'.format(req_patch.text))
+
+ assert req_patch.status_code == requests.codes.ok
+
+def test_delete():
+ '''Validate DELETE request'''
+
+ req_delete = requests.delete('{0}'.format(URI_DELETE_STRING),
+ auth=AUTH_STRING)
+
+ if req_delete.status_code != requests.codes.ok:
+ logger.error('DELETE request to {0} failed'.format(URI_DELETE_STRING))
+ logger.debug('Response content: {0}'.format(req_delete.text))
+
+ assert req_delete.status_code == requests.codes.ok