From: david-sarah Date: Thu, 20 May 2010 18:10:27 +0000 (-0700) Subject: SFTP tests: fix test_openDirectory_and_attrs that was failing in timezones west of... X-Git-Tag: trac-4400~15 X-Git-Url: https://git.rkrishnan.org/%5B/?a=commitdiff_plain;h=5545a678bf0e8ad2ad00b8311f19942247d7f613;p=tahoe-lafs%2Ftahoe-lafs.git SFTP tests: fix test_openDirectory_and_attrs that was failing in timezones west of UTC. --- diff --git a/src/allmydata/test/test_sftp.py b/src/allmydata/test/test_sftp.py index d267a40f..3f341eda 100644 --- a/src/allmydata/test/test_sftp.py +++ b/src/allmydata/test/test_sftp.py @@ -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"))