Mercurial > p > roundup > code
comparison test/memorydb.py @ 5465:c4f9a152258d
keep test code in sync with real implementation
| author | Christof Meerwald <cmeerw@cmeerw.org> |
|---|---|
| date | Sat, 28 Jul 2018 20:21:59 +0100 |
| parents | d0fd8bb64c3f |
| children | ae35daa5baab |
comparison
equal
deleted
inserted
replaced
| 5464:22eecc8a8bd4 | 5465:c4f9a152258d |
|---|---|
| 257 | 257 |
| 258 def __repr__(self): | 258 def __repr__(self): |
| 259 return '<memorydb instance at %x>'%id(self) | 259 return '<memorydb instance at %x>'%id(self) |
| 260 | 260 |
| 261 def storefile(self, classname, nodeid, property, content): | 261 def storefile(self, classname, nodeid, property, content): |
| 262 if isinstance(content, str): | |
| 263 content = s2b(content) | |
| 262 self.tx_files[classname, nodeid, property] = content | 264 self.tx_files[classname, nodeid, property] = content |
| 263 self.transactions.append((self.doStoreFile, (classname, nodeid, | 265 self.transactions.append((self.doStoreFile, (classname, nodeid, |
| 264 property))) | 266 property))) |
| 265 | 267 |
| 266 def getfile(self, classname, nodeid, property): | 268 def getfile(self, classname, nodeid, property): |
