def METHOD_NAME(self, mock_save):
    main_win, w = self.newWidget()
    mock_save.return_value = "delete_me.i", None
    self.checkMenus(w, True)
    w._save_as_action.triggered.emit()
    self.checkMenus(w, True, save=True, recent=True, recent_count=1)
    self.assertEqual(w.tree.input_filename, os.path.abspath("delete_me.i"))
    w._save_action.triggered.emit()
    self.checkMenus(w, True, save=True, recent=True, recent_count=1)
    mock_save.return_value = "delete_me2.i", None
    w._save_as_action.triggered.emit()
    self.checkMenus(w, True, save=True, recent=True, recent_count=2)
    self.assertEqual(w.tree.input_filename, os.path.abspath("delete_me2.i"))