blob: 6080d79eecace61c211871d07ed21fd571c70b07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
"""Integration test for the timezone module.
This test specifies a timezone to be used by the ``timezone`` module
and then checks that if that timezone was respected during boot.
(This is ported from
``tests/cloud_tests/testcases/modules/timezone.yaml``.)"""
import pytest
USER_DATA = """\
#cloud-config
timezone: US/Aleutian
"""
class TestTimezone:
@pytest.mark.user_data(USER_DATA)
def test_timezone(self, client):
timezone_output = client.execute(
'date "+%Z" --date="Thu, 03 Nov 2016 00:47:00 -0400"')
assert timezone_output.strip() == "HDT"
|