def test_do_push_without_dir(self): progress_panel = self.setup_ui() from_branch = self.make_from_branch() message = push.do_push(from_branch, 'that', False) self.assertEqual('1 revision(s) pushed.', message) self.assertEqual(True, progress_panel.pb.update.called) self.assertEqual(True, progress_panel.pb.finished.called)
def test_do_push_without_parent_dir(self): progress_panel = self.setup_ui() from_branch = self.make_from_branch() MockMethod.bind(self, push, 'question_dialog', Gtk.ResponseType.OK) message = push.do_push(from_branch, 'that/there', False) self.assertEqual('1 revision(s) pushed.', message) self.assertEqual(True, push.question_dialog.called) self.assertEqual(True, progress_panel.pb.update.called) self.assertEqual(True, progress_panel.pb.finished.called)
def test_do_push_without_parent_dir_aborted(self): self.setup_ui() from_branch = self.make_from_branch() MockMethod.bind(self, push, 'question_dialog', Gtk.ResponseType.CANCEL) message = push.do_push(from_branch, 'that/there', False) self.assertEqual('Push aborted.', message)