Exemple #1
0
def test_output():
    with mock.patch.object(logger.LoggerWithSuccessAndOutput, "_log") as _log:
        logger.LoggerWithSuccessAndOutput("foo").output("bar")
        _log.assert_called_once_with(logger.OUTPUT, "bar", ())
Exemple #2
0
def test_success():
    with mock.patch.object(logger.LoggerWithSuccessAndOutput, "_log") as _log:
        logger.LoggerWithSuccessAndOutput("foo").success("bar")
        _log.assert_called_once_with(logger.SUCCESS, "bar", ())