Module Expr Str ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias alias alias ImportFrom alias Expr Call NameLoad Str Import alias ImportFrom alias Import alias ImportFrom alias alias Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword NameLoad body Assign NameStore Call NameLoad keyword Dict Str Str Str Num With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword Dict Str Str Call AttributeLoad Str attr NameLoad Num With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad keyword Dict Str Str Call AttributeLoad Str attr NameLoad Num With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword NameLoad body Assign NameStore Call AttributeLoad Str attr ListLoad Str Str With Call NameLoad Str Call NameLoad keyword NameLoad keyword NameLoad NameStore body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call NameLoad Str Call NameLoad keyword NameLoad keyword NameLoad NameStore body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str body Assign NameStore Str Assign NameStore BinOpAdd Str NameLoad With Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str body Assign NameStore Str With Call NameLoad Str Call NameLoad keyword NameLoad NameStore body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Call NameLoad keyword Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Call NameLoad keyword Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Call NameLoad keyword ListLoad NameLoad NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad With Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Call NameLoad keyword NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword NameLoad body Expr Call NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Call NameLoad keyword Str body Expr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad Str keyword Str body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword Call NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword ListLoad Str Call NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword ListLoad Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword ListLoad Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword Dict Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword Dict Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword Dict Str Str body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Call NameLoad keyword Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Call NameLoad keyword Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Assign NameStore Str With Call NameLoad Str Call NameLoad keyword NameLoad NameStore body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Str With Call NameLoad Str Call NameLoad keyword NameLoad NameStore body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Assign NameStore Str With Call NameLoad Str Call NameLoad keyword NameLoad NameStore body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad body Assign NameStore Str With Call NameLoad Str Call NameLoad keyword NameLoad keyword NameLoad NameStore body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad body Assign NameStore Str With Call NameLoad Str Call NameLoad keyword NameLoad keyword NameLoad NameStore body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str With Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str decorator_list decorator_list Call NameLoad NameLoad NameLoad If CompareEq NameLoad Str body ImportFrom alias Expr Call NameLoad NameLoad keyword NameLoad
N/A N/A 
    :codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
 __future__ absolute_import salttesting skipIf TestCase salttesting.mock NO_MOCK NO_MOCK_REASON MagicMock mock_open patch salttesting.helpers ensure_in_syspath N/A N/A ensure_in_syspath ../../ N/A salt.utils salt.modules timezone N/A os salt.exceptions CommandExecutionError SaltInvocationError N/A N/A timezone __grains__ N/A N/A N/A timezone __salt__ N/A N/A N/A timezone __opts__ N/A TimezoneTestCase N/A TestCase N/A N/A 
    Test cases for salt.modules.timezone
     test_get_zone N/A N/A self N/A N/A N/A 
        Test to get current timezone (i.e. America/Denver)
         N/A zone MST N/A N/A N/A patch object N/A salt utils which return_value True N/A N/A mock_cmd N/A MagicMock return_value N/A stderr retcode error 1 N/A N/A N/A patch dict N/A timezone __salt__ N/A cmd.run_all mock_cmd N/A N/A N/A N/A self assertRaises CommandExecutionError N/A timezone get_zone N/A mock_cmd N/A MagicMock return_value N/A stdout retcode N/A N/A Timezone: {0} format zone 0 N/A N/A N/A patch dict N/A timezone __salt__ N/A cmd.run_all mock_cmd N/A N/A N/A N/A self assertEqual N/A N/A timezone get_zone zone N/A mock_cmd N/A MagicMock return_value N/A stdout retcode N/A N/A ZoneCTL: {0} format zone 0 N/A N/A N/A patch dict N/A timezone __salt__ N/A cmd.run_all mock_cmd N/A N/A N/A N/A self assertRaises CommandExecutionError N/A timezone get_zone N/A N/A N/A patch object N/A salt utils which return_value False N/A N/A file_data N/A N/A join N/A # A N/A N/A patch salt.utils.fopen N/A mock_open read_data file_data create True mfile N/A N/A N/A N/A N/A mfile return_value __iter__ return_value N/A N/A file_data splitlines N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family os Debian Debian N/A N/A N/A N/A self assertEqual N/A N/A timezone get_zone #
A N/A N/A patch salt.utils.fopen N/A mock_open read_data file_data create True mfile N/A N/A N/A N/A N/A mfile return_value __iter__ return_value N/A N/A file_data splitlines N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family os Gentoo Gentoo N/A N/A N/A N/A self assertEqual N/A N/A timezone get_zone #
A N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family os FreeBSD FreeBSD N/A N/A zone America/Denver N/A linkpath N/A /usr/share/zoneinfo/ zone N/A N/A N/A patch object os readlink return_value linkpath N/A N/A N/A N/A self assertEqual N/A N/A timezone get_zone zone N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family os Solaris Solaris N/A N/A fl_data TZ=Foo
 N/A N/A patch salt.utils.fopen N/A mock_open read_data fl_data mfile N/A N/A N/A N/A N/A mfile return_value __iter__ return_value N/A fl_data N/A N/A N/A self assertEqual N/A N/A timezone get_zone Foo N/A test_get_zonecode N/A N/A self N/A N/A N/A 
        Test to get current timezone (i.e. PST, MDT, etc)
         N/A N/A N/A patch dict N/A timezone __salt__ N/A cmd.run N/A MagicMock return_value A N/A N/A N/A N/A self assertEqual N/A N/A timezone get_zonecode A N/A test_get_offset N/A N/A self N/A N/A N/A 
        Test to get current numeric timezone offset from UCT (i.e. -0700)
         N/A N/A N/A patch dict N/A timezone __salt__ N/A cmd.run N/A MagicMock return_value A N/A N/A N/A N/A self assertEqual N/A N/A timezone get_offset A N/A test_set_zone N/A N/A self N/A N/A N/A 
        Test to unlinks, then symlinks /etc/localtime to the set timezone.
         zone_checking_and_unlinking N/A N/A N/A N/A N/A ret Zone does not exist: /usr/share/lib/zoneinfo/timezone N/A mock_exists N/A MagicMock side_effect N/A False True True N/A N/A N/A patch object N/A os path exists mock_exists N/A N/A N/A N/A self assertEqual N/A N/A timezone set_zone timezone ret N/A N/A N/A patch object os unlink return_value None N/A N/A N/A N/A patch dict N/A timezone __salt__ N/A file.sed N/A MagicMock return_value None N/A N/A N/A N/A self assertTrue N/A N/A timezone set_zone timezone N/A N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family Solaris N/A N/A N/A N/A patch object N/A salt utils which return_value False N/A N/A N/A zone_checking_and_unlinking N/A N/A N/A patch object N/A salt utils which return_value True N/A N/A N/A N/A patch dict N/A timezone __salt__ N/A cmd.run N/A MagicMock return_value N/A N/A N/A zone_checking_and_unlinking N/A test_zone_compare N/A N/A self N/A N/A N/A 
        Test to checks the hash sum between the given timezone, and the
        one set in /etc/localtime.
         N/A N/A N/A patch object timezone get_zone return_value US/Central N/A N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family Solaris N/A N/A N/A N/A self assertFalse N/A N/A timezone zone_compare Antarctica/Mawson N/A N/A N/A patch object N/A os path exists return_value False N/A N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family Sola N/A N/A N/A N/A self assertFalse N/A N/A timezone zone_compare America/New_York N/A N/A N/A self assertEqual N/A N/A timezone zone_compare US/Central Error: /etc/localtime does not exist. N/A N/A N/A patch object N/A os path exists return_value True N/A N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family Sola N/A N/A N/A N/A self assertFalse N/A N/A timezone zone_compare America/New_York N/A N/A N/A patch dict N/A timezone __opts__ N/A hash_type md5 N/A N/A N/A N/A patch object N/A salt utils get_hash side_effect N/A IOError foo N/A N/A N/A N/A self assertRaises SaltInvocationError N/A timezone zone_compare US/Central N/A N/A N/A patch object N/A salt utils get_hash side_effect N/A A N/A IOError foo N/A N/A N/A N/A self assertRaises CommandExecutionError N/A timezone zone_compare US/Central N/A N/A N/A patch object N/A salt utils get_hash side_effect N/A A A N/A N/A N/A N/A self assertTrue N/A N/A timezone zone_compare US/Central N/A N/A N/A patch object N/A salt utils get_hash side_effect N/A A B N/A N/A N/A N/A self assertFalse N/A N/A timezone zone_compare US/Central N/A test_get_hwclock N/A N/A self N/A N/A N/A 
        Test to get current hardware clock setting (UTC or localtime)
         N/A mock_t N/A MagicMock return_value True N/A mock_f N/A MagicMock return_value False N/A N/A N/A patch object N/A salt utils which return_value True N/A N/A N/A N/A patch object timezone _timedatectl N/A MagicMock return_value N/A stdout rtc in local tz:yes
 N/A N/A N/A N/A self assertEqual N/A N/A timezone get_hwclock localtime N/A N/A N/A patch object timezone _timedatectl N/A MagicMock return_value N/A stdout rtc in local tz:No
 N/A N/A N/A N/A self assertEqual N/A N/A timezone get_hwclock UTC N/A N/A N/A patch object timezone _timedatectl N/A MagicMock return_value N/A stdout rtc N/A N/A N/A N/A self assertRaises CommandExecutionError N/A timezone get_hwclock N/A N/A N/A patch object N/A salt utils which return_value False N/A N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family RedHat N/A N/A N/A N/A patch dict N/A timezone __salt__ N/A cmd.run N/A MagicMock return_value A N/A N/A N/A N/A self assertEqual N/A N/A timezone get_hwclock A N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family Suse N/A N/A N/A N/A patch dict N/A timezone __salt__ N/A cmd.run N/A MagicMock return_value A N/A N/A N/A N/A self assertEqual N/A N/A timezone get_hwclock A N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family Debian N/A N/A fl_data UTC=yes
 N/A N/A patch salt.utils.fopen N/A mock_open read_data fl_data mfile N/A N/A N/A N/A N/A mfile return_value __iter__ return_value N/A fl_data N/A N/A N/A self assertEqual N/A N/A timezone get_hwclock UTC N/A fl_data UTC=no
 N/A N/A patch salt.utils.fopen N/A mock_open read_data fl_data mfile N/A N/A N/A N/A N/A mfile return_value __iter__ return_value N/A fl_data N/A N/A N/A self assertEqual N/A N/A timezone get_hwclock localtime N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family Gentoo N/A N/A fl_data clock=UTC
 N/A N/A patch salt.utils.fopen N/A mock_open read_data fl_data mfile N/A N/A N/A N/A N/A mfile return_value __iter__ return_value N/A fl_data N/A N/A N/A self assertEqual N/A N/A timezone get_hwclock UTC N/A N/A N/A patch object N/A os path isfile mock_t N/A N/A fl_data zone_info=GMT N/A N/A patch salt.utils.fopen N/A mock_open read_data fl_data create True mfile N/A N/A N/A N/A N/A mfile return_value __iter__ return_value N/A N/A fl_data splitlines N/A N/A N/A patch object N/A salt utils which return_value False N/A N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family Solaris N/A N/A N/A N/A self assertEqual N/A N/A timezone get_hwclock UTC N/A N/A N/A patch object N/A os path isfile mock_t N/A N/A fl_data A=GMT N/A N/A patch salt.utils.fopen N/A mock_open read_data fl_data create True mfile N/A N/A N/A N/A N/A mfile return_value __iter__ return_value N/A N/A fl_data splitlines N/A N/A N/A patch object N/A salt utils which return_value False N/A N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family Solaris N/A N/A N/A N/A self assertEqual N/A N/A timezone get_hwclock localtime N/A N/A N/A patch object N/A salt utils which return_value False N/A N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family Solaris N/A N/A N/A N/A patch object N/A os path isfile mock_f N/A N/A N/A N/A self assertEqual N/A N/A timezone get_hwclock UTC N/A test_set_hwclock N/A N/A self N/A N/A N/A 
        Test to sets the hardware clock to be either UTC or localtime
         N/A zone America/Denver N/A N/A N/A patch object timezone get_zone return_value zone N/A N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family cpuarch Solaris sparc N/A N/A N/A N/A self assertRaises SaltInvocationError N/A timezone set_hwclock clock N/A N/A N/A self assertRaises SaltInvocationError N/A timezone set_hwclock localtime N/A N/A N/A patch dict N/A timezone __grains__ N/A os_family DoesNotMatter N/A N/A N/A N/A patch object N/A os path exists return_value False N/A N/A N/A N/A self assertRaises CommandExecutionError N/A timezone set_hwclock UTC N/A N/A N/A skipIf NO_MOCK NO_MOCK_REASON N/A N/A __name__ __main__ N/A integration run_tests N/A N/A run_tests TimezoneTestCase needs_daemon False