File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 31
31
32
32
import re
33
33
import os
34
+ import copy
34
35
import time
35
36
import json
36
37
import codecs
@@ -921,6 +922,8 @@ def hasTemplate(s):
921
922
class Json (String ):
922
923
__slots__ = ()
923
924
925
+ def __call__ (self ):
926
+ return copy .deepcopy (super (Json , self ).__call__ ())
924
927
def set (self , v ):
925
928
self .setValue (json .loads (v ))
926
929
def __str__ (self ):
Original file line number Diff line number Diff line change @@ -140,13 +140,13 @@ def testJson(self):
140
140
self .assertIsNot (v (), data )
141
141
142
142
with v .editable () as dict_ :
143
- dict_ ['supy' ] = 'bot'
143
+ dict_ ['supy' ] = [ 'bot' ]
144
144
del dict_ ['qux' ]
145
145
self .assertNotIn ('supy' , v ())
146
146
self .assertIn ('qux' , v ())
147
147
self .assertIn ('supy' , v ())
148
- self .assertEqual (v ()['supy' ], 'bot' )
149
- self .assertIsNot (v ()['supy' ], 'bot' )
148
+ self .assertEqual (v ()['supy' ], [ 'bot' ] )
149
+ self .assertIsNot (v ()['supy' ], [ 'bot' ] )
150
150
self .assertNotIn ('qux' , v ())
151
151
152
152
def testNormalizedString (self ):
You can’t perform that action at this time.
0 commit comments