diff options
author | thuva4 <tharma.thuva@gmail.com> | 2017-09-07 19:03:57 +0530 |
---|---|---|
committer | thuva4 <tharma.thuva@gmail.com> | 2017-09-11 14:48:55 +0530 |
commit | 6c5fcb955cada2b6323742a07ba4d38edd08ff67 (patch) | |
tree | 290f7476058a042a620294aae5be6613a813a474 /utils/test/testapi/opnfv_testapi/tests/unit/resources/test_pod.py | |
parent | 5283e9de99b87d74cb5bb28da04b48f17c02a3b6 (diff) |
add case-insensitive for find pods query
Now user can't create the pods with the same name.
Just like "Demo" , "deMo" and "demo"
Add unit test for case-insensitive query
Change-Id: Ifddc7b70a38d8504e5fe105fa5cc1a77bf0e39a9
Signed-off-by: thuva4 <tharma.thuva@gmail.com>
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/tests/unit/resources/test_pod.py')
-rw-r--r-- | utils/test/testapi/opnfv_testapi/tests/unit/resources/test_pod.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_pod.py b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_pod.py index cb4f1d92c..d1a19f7f0 100644 --- a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_pod.py +++ b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_pod.py @@ -21,6 +21,8 @@ class TestPodBase(base.TestBase): self.req_d = pod_models.PodCreateRequest('zte-1', 'virtual', 'zte pod 1', 'ci-pod') self.req_e = pod_models.PodCreateRequest('zte-2', 'metal', 'zte pod 2') + self.req_f = pod_models.PodCreateRequest('Zte-1', 'virtual', + 'zte pod 1', 'ci-pod') self.get_res = pod_models.Pod self.list_res = pod_models.Pods self.basePath = '/api/v1/pods' @@ -58,6 +60,11 @@ class TestPodCreate(TestPodBase): self.create_d() return self.req_d + @executor.create(httplib.FORBIDDEN, message.exist_base) + def test_alreadyExistCaseInsensitive(self): + self.create(self.req_f) + return self.req_d + class TestPodGet(TestPodBase): def setUp(self): |