]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_ftp: fix comparison against integer
authorBrian Warner <warner@lothar.com>
Tue, 31 Mar 2015 16:30:17 +0000 (09:30 -0700)
committerBrian Warner <warner@lothar.com>
Tue, 31 Mar 2015 18:06:14 +0000 (11:06 -0700)
src/allmydata/test/test_ftp.py

index c98a320966224265a11a924942816a2c80556594..d3e3082baa9192c1b3f5532bca2654aed9f3dc5c 100644 (file)
@@ -79,6 +79,11 @@ 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)