From 5545a678bf0e8ad2ad00b8311f19942247d7f613 Mon Sep 17 00:00:00 2001 From: david-sarah Date: Thu, 20 May 2010 11:10:27 -0700 Subject: [PATCH] SFTP tests: fix test_openDirectory_and_attrs that was failing in timezones west of UTC. --- src/allmydata/test/test_sftp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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")) -- 2.45.2