Update test_configcommands for new editor behavior.

Now that the editor signals on save, the configcommands editing
unittests need to emit the signal in the patch rather than relying on
on_proc_closed to emit the signal.
This commit is contained in:
Ryan Roden-Corrent 2017-12-29 22:07:37 -05:00
parent a940de3717
commit 2e5595b5c6

View File

@ -330,7 +330,7 @@ class TestEdit:
def _write_file(editor_self): def _write_file(editor_self):
with open(editor_self._filename, 'w', encoding='utf-8') as f: with open(editor_self._filename, 'w', encoding='utf-8') as f:
f.write(text) f.write(text)
editor_self.on_proc_closed(0, QProcess.NormalExit) editor_self.file_updated.emit(text)
return mocker.patch('qutebrowser.config.configcommands.editor.' return mocker.patch('qutebrowser.config.configcommands.editor.'
'ExternalEditor._start_editor', autospec=True, 'ExternalEditor._start_editor', autospec=True,