support keys start with '$' or contain '.' in testAPI
[releng.git] / utils / test / result_collection_api / opnfv_testapi / tests / unit / test_testcase.py
index a145c00..cb76784 100644 (file)
@@ -7,6 +7,7 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 import unittest
+import copy
 
 from test_base import TestBase
 from opnfv_testapi.resources.testcase_models import TestcaseCreateRequest, \
@@ -168,6 +169,13 @@ class TestCaseUpdate(TestCaseBase):
         self.assertEqual(_id, new_body._id)
         self.assert_update_body(self.req_d, new_body, self.update_e)
 
+    def test_with_dollar(self):
+        self.create_d()
+        update = copy.deepcopy(self.update_d)
+        update.description = {'2. change': 'dollar change'}
+        code, body = self.update(update, self.req_d.name)
+        self.assertEqual(code, HTTP_OK)
+
 
 class TestCaseDelete(TestCaseBase):
     def test_notFound(self):