salt/tests/unit/fileserver/test_map.py
Pedro Algarvio 3beb3fb801
Move whatever we need from salttesting to salt.
Let's drop the salttesting dependency cycle.
2017-02-28 22:52:49 +00:00

31 lines
799 B
Python

# -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Joao Mesquita <jmesquita@sangoma.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from tests.support.unit import TestCase
from salt import fileserver
class MapDiffTestCase(TestCase):
def test_diff_with_diffent_keys(self):
'''
Test that different maps are indeed reported different
'''
map1 = {'file1': 1234}
map2 = {'file2': 1234}
assert fileserver.diff_mtime_map(map1, map2) is True
def test_diff_with_diffent_values(self):
'''
Test that different maps are indeed reported different
'''
map1 = {'file1': 12345}
map2 = {'file1': 1234}
assert fileserver.diff_mtime_map(map1, map2) is True