Show More
@@ -269,8 +269,8 b' class StrictDict(dict):' | |||||
269 | pickle.dumps(key, 2) |
|
269 | pickle.dumps(key, 2) | |
270 | pickle.dumps(value, 2) |
|
270 | pickle.dumps(value, 2) | |
271 | newvalue = copy.deepcopy(value) |
|
271 | newvalue = copy.deepcopy(value) | |
272 | except: |
|
272 | except Exception, e: | |
273 | raise error.InvalidProperty(value) |
|
273 | raise error.InvalidProperty("can't be a value: %r" % value) | |
274 | dict.__setitem__(self, key, newvalue) |
|
274 | dict.__setitem__(self, key, newvalue) | |
275 | self.modified = True |
|
275 | self.modified = True | |
276 |
|
276 |
@@ -363,7 +363,8 b' class IEnginePropertiesTestCase(object):' | |||||
363 | p = get_engine(%s).properties"""%self.engine.id |
|
363 | p = get_engine(%s).properties"""%self.engine.id | |
364 | d = self.engine.execute(s) |
|
364 | d = self.engine.execute(s) | |
365 | d.addCallback(lambda r: self.engine.execute("p['a'] = lambda _:None")) |
|
365 | d.addCallback(lambda r: self.engine.execute("p['a'] = lambda _:None")) | |
366 |
d |
|
366 | d.addErrback(lambda f: self.assertRaises(error.InvalidProperty, | |
|
367 | f.raiseException)) | |||
367 | d.addCallback(lambda r: self.engine.execute("p['a'] = range(5)")) |
|
368 | d.addCallback(lambda r: self.engine.execute("p['a'] = range(5)")) | |
368 | d.addCallback(lambda r: self.engine.execute("p['a'].append(5)")) |
|
369 | d.addCallback(lambda r: self.engine.execute("p['a'].append(5)")) | |
369 | d.addCallback(lambda r: self.engine.get_properties('a')) |
|
370 | d.addCallback(lambda r: self.engine.get_properties('a')) |
General Comments 0
You need to be logged in to leave comments.
Login now