def test_showErrorMessage_should_call_showMessage_with_result(self): utils = VimeoUtils() utils.showMessage = Mock() result = utils.showErrorMessage("someTitle","someResult", 303) utils.showMessage.assert_called_with("someTitle","someResult")
def test_showErrorMessage_should_call_showMessage_with_default(self): sys.modules["__main__"].language.return_value = "ERROR" utils = VimeoUtils() utils.showMessage = Mock() result = utils.showErrorMessage("someTitle","someResult") utils.showMessage.assert_called_with("someTitle","ERROR")
def test_showErrorMessage_should_call_showMessage_with_empty_title(self): sys.modules["__main__"].language.return_value = "ERROR" utils = VimeoUtils() utils.showMessage = Mock() result = utils.showErrorMessage("","someResult", 303) utils.showMessage.assert_called_with("ERROR","someResult") sys.modules["__main__"].language.assert_called_with(30600)