1
0

test_fileserver.py 824 B

123456789101112131415161718192021222324252627282930
  1. # -*- coding: utf-8 -*-
  2. '''
  3. :codeauthor: Joao Mesquita <jmesquita@sangoma.com>
  4. '''
  5. # Import Python libs
  6. from __future__ import absolute_import, print_function, unicode_literals
  7. # Import Salt Testing libs
  8. from tests.support.unit import TestCase
  9. from salt import fileserver
  10. class MapDiffTestCase(TestCase):
  11. def test_diff_with_diffent_keys(self):
  12. '''
  13. Test that different maps are indeed reported different
  14. '''
  15. map1 = {'file1': 1234}
  16. map2 = {'file2': 1234}
  17. assert fileserver.diff_mtime_map(map1, map2) is True
  18. def test_diff_with_diffent_values(self):
  19. '''
  20. Test that different maps are indeed reported different
  21. '''
  22. map1 = {'file1': 12345}
  23. map2 = {'file1': 1234}
  24. assert fileserver.diff_mtime_map(map1, map2) is True