def test_continuePrompt(self): with mock.patch('builtins.print') as fake_print, \ mock.patch('builtins.input') as fake_input: Messages.continuePrompt("yes") fake_input.assert_called_once() fake_print.assert_called_once() fake_input.assert_called_with("yes")
def makeDxf(self, entities, number_of_beams): self.drawEntities(entities) #setup viewports VPort(self.dwg, number_of_beams) output_path = self.app_data.getOutPutFile() try: self.dwg.saveas(output_path) Messages.i("") Messages.i(MessageCodes.INFO_DXF_GENERATED % output_path) except PermissionError: Messages.showError(MessageCodes.ERROR_OPEN_DXF) Messages.continuePrompt(MessageCodes.INFO_CONTINUE_PROMPT)