summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/testcases/modules/timezone.py
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-03-13 14:35:29 -0400
committerScott Moser <smoser@brickies.net>2017-03-13 14:35:29 -0400
commit66dfb0915d4abf3f61948f281c4aff8394494ed3 (patch)
treee61d834e14af9a490baed7699eab97cfd9d99eed /tests/cloud_tests/testcases/modules/timezone.py
parent482b2746b5919233afec55776d5fc996cdc2f38e (diff)
downloadvyos-cloud-init-66dfb0915d4abf3f61948f281c4aff8394494ed3.tar.gz
vyos-cloud-init-66dfb0915d4abf3f61948f281c4aff8394494ed3.zip
test: avoid differences in 'date' output due to daylight savings.
When testing for timezone we were testing that 'date' output would contain 'HDT' for the current time. But after a 'spring forward', the current time started to have 'HST'. Instead of asking 'date' for the timezone that applies now, ask it for a static date.
Diffstat (limited to 'tests/cloud_tests/testcases/modules/timezone.py')
-rw-r--r--tests/cloud_tests/testcases/modules/timezone.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/cloud_tests/testcases/modules/timezone.py b/tests/cloud_tests/testcases/modules/timezone.py
index 272c266f..bf91d490 100644
--- a/tests/cloud_tests/testcases/modules/timezone.py
+++ b/tests/cloud_tests/testcases/modules/timezone.py
@@ -10,6 +10,6 @@ class TestTimezone(base.CloudTestCase):
def test_timezone(self):
"""Test date prints correct timezone"""
out = self.get_data_file('timezone')
- self.assertIn('HST', out)
+ self.assertEqual('HDT', out.rstrip())
# vi: ts=4 expandtab