]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blobdiff - src/allmydata/test/test_ftp.py
bump Twisted dep to 11.1.0, thus simplify IntishPermissions
[tahoe-lafs/tahoe-lafs.git] / src / allmydata / test / test_ftp.py
index d3e3082baa9192c1b3f5532bca2654aed9f3dc5c..9457e540ac8cfcd51c019604b701d7e254c2ed15 100644 (file)
@@ -79,11 +79,6 @@ class Handler(GridTestMixin, ReallyEqualMixin, unittest.TestCase):
                                        actual_list, expected_list))
         for (a, b) in zip(actual_list, expected_list):
            (name, meta) = a
-           # convert meta.permissions to int for comparison. When we run
-           # against many (but not all) versions of Twisted, this is a
-           # filepath.Permissions object, not an int
-           meta = list(meta)
-           meta[2] = meta[2] & 0xffffffff
            (expected_name, expected_meta) = b
            self.failUnlessReallyEqual(name, expected_name)
            self.failUnlessReallyEqual(meta, expected_meta)
@@ -98,12 +93,12 @@ class Handler(GridTestMixin, ReallyEqualMixin, unittest.TestCase):
 
         expected_root = [
             ('loop',
-             [0, True, 0600, 1, self.FALL_OF_BERLIN_WALL, 'alice', 'alice', '??']),
+             [0, True, ftpd.IntishPermissions(0600), 1, self.FALL_OF_BERLIN_WALL, 'alice', 'alice', '??']),
             ('immutable',
-             [23, False, 0600, 1, self.TURN_OF_MILLENIUM, 'alice', 'alice', '??']),
+             [23, False, ftpd.IntishPermissions(0600), 1, self.TURN_OF_MILLENIUM, 'alice', 'alice', '??']),
             ('mutable',
              # timestamp should be 0 if no timestamp metadata is present
-             [0, False, 0600, 1, 0, 'alice', 'alice', '??'])]
+             [0, False, ftpd.IntishPermissions(0600), 1, 0, 'alice', 'alice', '??'])]
 
         d.addCallback(lambda root: self._compareDirLists(root, expected_root))