Skip to content

Instantly share code, notes, and snippets.

@jskulski
Last active August 29, 2015 14:22
Show Gist options
  • Save jskulski/49cd79a6d1015011272f to your computer and use it in GitHub Desktop.
Save jskulski/49cd79a6d1015011272f to your computer and use it in GitHub Desktop.
Using the simple spy
def test_that_editing_a_buffer_then_quitting_causes_save_dialog(self):
self.editor.gui.quitdialog.show = self.spy()
editor_input.type_keys('modify the buffer', self.editor)
self.editor.save_dialog_or_quit_editor()
self.assertTrue(self.editor.gui.quitdialog.show.was_called)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment