def testEncryptedStyles(self):
try:
import Crypto
except ImportError:
raise unittest.SkipTest()
for o in objects:
phrase='once I was the king of spain'
p = sob.Persistent(o, '')
for style in 'xml source pickle'.split():
if style == 'xml' and not gotMicrodom:
continue
p.setStyle(style)
p.save(filename='epersisttest.'+style, passphrase=phrase)
o1 = sob.load('epersisttest.'+style, style, phrase)
self.failUnlessEqual(o, o1)
评论列表
文章目录