def METHOD_NAME(self):
    def set_save_name():
        timer.stop()
        input_dialog = next(w for w in qApp.topLevelWidgets() if isinstance(w, QInputDialog))
        input_dialog.setTextValue("Test decoding")
        input_dialog.accept()
    def accept_delete():
        timer.stop()
        message_box = next(w for w in qApp.topLevelWidgets() if isinstance(w, QMessageBox))
        message_box.button(QMessageBox.Yes).click()
    self.dialog.ui.decoderchain.addItem(settings.DECODING_CUT)
    self.dialog.decoderchainUpdate()
    self.assertEqual(self.dialog.ui.decoderchain.count(), 1)
    timer = QTimer(self.dialog)
    timer.setSingleShot(True)
    timer.timeout.connect(set_save_name)
    timer.start(10)
    self.dialog.ui.saveas.click()
    self.assertEqual(self.dialog.ui.combobox_decodings.currentText(), "Test decoding")
    timer.timeout.disconnect(set_save_name)
    timer.timeout.connect(accept_delete)
    timer.start(10)
    self.dialog.ui.delete_decoding.click()
    self.assertNotEqual(self.dialog.ui.combobox_decodings.currentText(), "Test decoding")