]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
SFTP tests: fix test_openDirectory_and_attrs that was failing in timezones west of...
authordavid-sarah <david-sarah@jacaranda.org>
Thu, 20 May 2010 18:10:27 +0000 (11:10 -0700)
committerdavid-sarah <david-sarah@jacaranda.org>
Thu, 20 May 2010 18:10:27 +0000 (11:10 -0700)
src/allmydata/test/test_sftp.py

index d267a40f3975a51ec269fca2233582e6a44d6d29..3f341edac55ea0ef9cabfcc65b0b0113656d14fc 100644 (file)
@@ -326,8 +326,9 @@ class Handler(GridTestMixin, ShouldFailMixin, unittest.TestCase):
         d.addCallback(lambda ign: self.handler.openDirectory("empty_lit_dir"))
         d.addCallback(lambda res: self._compareDirLists(res, []))
 
+        # The UTC epoch may either be in Jan 1 1970 or Dec 31 1969 depending on the gateway's timezone.
         expected_tiny_lit = [
-            ('short', r'-r--r--r-- .* 8 Jan 01  1970 short$', {'permissions': S_IFREG | 0444, 'size': 8}),
+            ('short', r'-r--r--r-- .* 8 (Jan 01  1970|Dec 31  1969) short$', {'permissions': S_IFREG | 0444, 'size': 8}),
         ]
 
         d.addCallback(lambda ign: self.handler.openDirectory("tiny_lit_dir"))