diff --git a/src/allmydata/test/test_mutable.py b/src/allmydata/test/test_mutable.py
index e6eea1e..c20c0cc 100644
a
|
b
|
class Interoperability(GridTestMixin, unittest.TestCase, testutil.ShouldFailMixi |
3577 | 3577 | d = n.download_best_version() |
3578 | 3578 | d.addCallback(self.failUnlessEqual, self.sdmf_old_contents) |
3579 | 3579 | return d |
| 3580 | |
| 3581 | class DifferentEncoding(unittest.TestCase): |
| 3582 | def setUp(self): |
| 3583 | self._storage = s = FakeStorage() |
| 3584 | self.nodemaker = make_nodemaker(s) |
| 3585 | |
| 3586 | def test_new_encoding(self): |
| 3587 | # create a file with 3-of-20, then modify it with a client configured |
| 3588 | # to do 3-of-10. I saw a failure here. |
| 3589 | self.nodemaker.default_encoding_parameters["n"] = 20 |
| 3590 | d = self.nodemaker.create_mutable_file("old contents") |
| 3591 | def _created(n): |
| 3592 | filecap = n.get_cap().to_string() |
| 3593 | del n # we want a new object, not the cached one |
| 3594 | self.nodemaker.default_encoding_parameters["n"] = 10 |
| 3595 | n2 = self.nodemaker.create_from_cap(filecap) |
| 3596 | return n2 |
| 3597 | d.addCallback(_created) |
| 3598 | def modifier(old_contents, servermap, first_time): |
| 3599 | return "new contents" |
| 3600 | d.addCallback(lambda n: n.modify(modifier)) |
| 3601 | return d |
| 3602 | |