widgets: use qtutils.BlockSignals to manage blockSignals(bool)
[git-cola.git] / test / models_selection_test.py
blob474bcdf4aee1319ebeabc3f7ba5ec9199ecf0ccf
1 from __future__ import absolute_import, division, unicode_literals
2 import unittest
4 import mock
6 from cola.models import selection
9 class SelectionTestCase(unittest.TestCase):
10 def test_union(self):
11 t = mock.Mock()
12 t.staged = ['a']
13 t.unmerged = ['a', 'b']
14 t.modified = ['b', 'a', 'c']
15 t.untracked = ['d']
17 expect = ['a', 'b', 'c', 'd']
18 actual = selection.union(t)
19 self.assertEqual(expect, actual)
22 if __name__ == '__main__':
23 unittest.main()