This commit is contained in:
STEPHANVS 2022-02-16 03:56:56 +01:00
parent 7320f2ddc9
commit b0d34f3f19
No known key found for this signature in database
GPG Key ID: 4EFE47E471FD62A9

View File

@ -150,7 +150,7 @@ def test_password_change(mocked_settings_set_val, mocked_question, form):
form.save() form.save()
# THEN: footer should not have been saved (one less call than the change test below) # THEN: footer should not have been saved (one less call than the change test below)
mocked_question.assert_called_once() mocked_question.assert_called_once()
assert mocked_settings_set_val.call_count == 10 assert mocked_settings_set_val.call_count == 11
@patch('openlp.plugins.songs.lib.songstab.QtWidgets.QMessageBox.question') @patch('openlp.plugins.songs.lib.songstab.QtWidgets.QMessageBox.question')
@ -166,7 +166,7 @@ def test_password_change_cancelled(mocked_settings_set_val, mocked_question, for
form.save() form.save()
# THEN: footer should not have been saved (one less call than the change test below) # THEN: footer should not have been saved (one less call than the change test below)
mocked_question.assert_called_once() mocked_question.assert_called_once()
assert mocked_settings_set_val.call_count == 9 assert mocked_settings_set_val.call_count == 10
@patch('openlp.core.common.settings.Settings.setValue') @patch('openlp.core.common.settings.Settings.setValue')
@ -178,7 +178,7 @@ def test_footer_nochange(mocked_settings_set_val, form):
# WHEN: save is invoked # WHEN: save is invoked
form.save() form.save()
# THEN: footer should not have been saved (one less call than the change test below) # THEN: footer should not have been saved (one less call than the change test below)
assert mocked_settings_set_val.call_count == 10 assert mocked_settings_set_val.call_count == 11
@patch('openlp.core.common.settings.Settings.setValue') @patch('openlp.core.common.settings.Settings.setValue')
@ -191,7 +191,7 @@ def test_footer_change(mocked_settings_set_val, form):
# WHEN: save is invoked # WHEN: save is invoked
form.save() form.save()
# THEN: footer should have been saved (one more call to setValue than the nochange test) # THEN: footer should have been saved (one more call to setValue than the nochange test)
assert mocked_settings_set_val.call_count == 11 assert mocked_settings_set_val.call_count == 12
assert form.footer_edit_box.toPlainText() == 'A new footer' assert form.footer_edit_box.toPlainText() == 'A new footer'