Merge pull request #916 from xieofxie/submodule into master
[git-cola.git] / test / models_selection_test.py
blob536341478b8381567b7ac27215b6e5ee72df7426
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):
11 def test_union(self):
12 t = mock.Mock()
13 t.staged = ['a']
14 t.unmerged = ['a', 'b']
15 t.modified = ['b', 'a', 'c']
16 t.untracked = ['d']
18 expect = ['a', 'b', 'c', 'd']
19 actual = selection.union(t)
20 self.assertEqual(expect, actual)
23 if __name__ == '__main__':
24 unittest.main()