~sinzui/bzr-gtk/gpush-do-push

« back to all changes in this revision

Viewing changes to tests/test_push.py

  • Committer: Curtis Hovey
  • Date: 2012-03-04 01:54:22 UTC
  • Revision ID: sinzui.is@verizon.net-20120304015422-x2ne1jady05xq66u
Added comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
        self.assertIs(None, ui.ui_factory._progress_bar_widget)
96
96
 
97
97
    def test_on_push_clicked_without_errors(self):
 
98
        # Verify the dialog's and branch's final states after a push.
98
99
        MockMethod.bind(self, push, 'do_push', "test success")
99
100
        set_ui_factory()
100
101
        branch = self.make_push_branch()
116
117
        self.assertEqual('lp:~user/fnord/test', branch.get_push_location())
117
118
 
118
119
    def test_on_push_clicked_with_divered_branches(self):
 
120
        # Verify that when DivergedBranches is raise, the user can choose
 
121
        # to overwrite the branch.
119
122
        error = errors.DivergedBranches(None, None)
120
123
        MockMethod.bind(self, push, 'do_push', raise_error=error)
121
124
        MockMethod.bind(self, push, 'question_dialog', Gtk.ResponseType.YES)