def test_showErrorMessage_should_use_default_message_if_non_is_present(self): sys.modules["__main__"].language.return_value = "ERROR" utils = BlipTVUtils() utils.showMessage = Mock() result = utils.showErrorMessage("","someResult") sys.modules["__main__"].language.assert_any_call(30600)
def test_showErrorMessage_should_call_showMessage_with_default_message_if_error_is_not_303(self): sys.modules["__main__"].language.return_value = "ERROR" utils = BlipTVUtils() utils.showMessage = Mock() result = utils.showErrorMessage("someTitle","someResult") utils.showMessage.assert_called_with("someTitle","ERROR")