/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to tests/test_commit.py

  • Committer: John Arbash Meinel
  • Date: 2007-10-12 18:10:24 UTC
  • mto: (322.1.1 trunk) (330.3.3 trunk)
  • mto: This revision was merged to the branch mainline in revision 368.
  • Revision ID: john@arbash-meinel.com-20071012181024-t332b4l0338y419t
Make use of the 'selected' parameter to CommitDialog.
Also update the Olive interfaces to properly use CommitDialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
369
369
                          ('a-id', 'a', True, 'a', 'removed'),
370
370
                          ('b-id', 'b', True, 'b/', 'removed'),
371
371
                         ], values)
 
372
        # All Files should be selected
 
373
        self.assertEqual(((0,), None), dlg._treeview_files.get_cursor())
 
374
 
 
375
    def test_filelist_with_selected(self):
 
376
        tree = self.make_branch_and_tree('tree')
 
377
        self.build_tree(['tree/a', 'tree/b/'])
 
378
        tree.add(['a', 'b'], ['a-id', 'b-id'])
 
379
 
 
380
        dlg = commit.CommitDialog(tree, selected='a')
 
381
        values = [(r[0], r[1], r[2], r[3], r[4]) for r in dlg._files_store]
 
382
        self.assertEqual([(None, None, False, 'All Files', ''),
 
383
                          ('a-id', 'a', True, 'a', 'added'),
 
384
                          ('b-id', 'b', False, 'b/', 'added'),
 
385
                         ], values)
 
386
        # This file should also be selected in the file list, rather than the
 
387
        # 'All Files' selection
 
388
        self.assertEqual(((1,), None), dlg._treeview_files.get_cursor())
372
389
 
373
390
    def test_diff_view(self):
374
391
        tree = self.make_branch_and_tree('tree')