Skip to content

Commit 721ede4

Browse files
committed
Update test_kvstore_conf.py
1 parent fe6b5ba commit 721ede4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_kvstore_conf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# under the License.
1616

1717
from __future__ import absolute_import
18+
19+
import json
1820
from tests import testlib
1921
try:
2022
import unittest
@@ -50,9 +52,10 @@ def test_create_fields(self):
5052

5153
def test_update_collection(self):
5254
self.confs.create('test')
53-
self.confs['test'].post(**{'accelerated_fields.ind1': '{"a": 1}', 'field.a': 'number'})
55+
val = {"a": 1}
56+
self.confs['test'].post(**{'accelerated_fields.ind1': json.dumps(val), 'field.a': 'number'})
5457
self.assertEqual(self.confs['test']['field.a'], 'number')
55-
self.assertEqual(self.confs['test']['accelerated_fields.ind1'], '{"a": 1}')
58+
self.assertEqual(self.confs['test']['accelerated_fields.ind1'], {"a": 1})
5659
self.confs['test'].delete()
5760

5861
def test_update_accelerated_fields(self):

0 commit comments

Comments
 (0)