def test_zone_compare(self):
        with patch.object(timezone, 'get_zone', return_value='US/Central'):
            with patch.dict(timezone.__grains__, {'os_family': 'Solaris'}):
                self.assertFalse(timezone.zone_compare('Antarctica/Mawson'))

            with patch.object(os.path, 'exists', return_value=False):
                with patch.dict(timezone.__grains__, {'os_family': 'Sola'}):
                    self.assertFalse(timezone.zone_compare('America/New_York'))

                    self.assertEqual(timezone.zone_compare('US/Central'),
                                     'Error: /etc/localtime does not exist.')

            with patch.object(os.path, 'exists', return_value=True):
                with patch.dict(timezone.__grains__, {'os_family': 'Sola'}):
                    self.assertFalse(timezone.zone_compare('America/New_York'))
                    with patch.dict(timezone.__opts__, {'hash_type': 'md5'}):
                        with patch.object(salt.utils, 'get_hash',
                                          side_effect=IOError('foo')):
                            self.assertRaises(SaltInvocationError,
                                              timezone.zone_compare, 'US/Central')

                        with patch.object(salt.utils, 'get_hash',
                                          side_effect=['A', IOError('foo')]):
                            self.assertRaises(CommandExecutionError,
                                              timezone.zone_compare, 'US/Central')

                        with patch.object(salt.utils, 'get_hash',
                                          side_effect=['A', 'A']):
                            self.assertTrue(timezone.zone_compare('US/Central'))

                        with patch.object(salt.utils, 'get_hash',
                                          side_effect=['A', 'B']):
                            self.assertFalse(timezone.zone_compare('US/Central'))
Test to checks the hash sum between the given timezone, and the
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/timezone_test.py/TimezoneTestCase.test_zone_compare