How to use the dockerflow.flask.checks.Error function in dockerflow

To help you get started, we’ve selected a few dockerflow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla-services / python-dockerflow / tests / flask / test_flask.py View on Github external
def error_check():
        return [checks.Error("some error", id="tests.checks.E001")]
github mozilla-services / python-dockerflow / tests / flask / test_flask.py View on Github external
def test_check_message():
    message = checks.Error("some error", level=100, id="tests.checks.E001")
    assert str(message) == "?: (tests.checks.E001) some error"
    assert message.is_serious()

    obj = "test"
    message = checks.Error("some error", level=100, id="tests.checks.E001", obj=obj)
    assert str(message) == "test: (tests.checks.E001) some error"
    assert (
        repr(message) == ""
    )

    message2 = checks.Error("some error", level=100, id="tests.checks.E001", obj=obj)
    assert message == message2

    message3 = checks.Error("some error", level=101, id="tests.checks.E001", obj=obj)
    assert message != message3
github mozilla-services / python-dockerflow / tests / flask / test_flask.py View on Github external
message = checks.Error("some error", level=100, id="tests.checks.E001")
    assert str(message) == "?: (tests.checks.E001) some error"
    assert message.is_serious()

    obj = "test"
    message = checks.Error("some error", level=100, id="tests.checks.E001", obj=obj)
    assert str(message) == "test: (tests.checks.E001) some error"
    assert (
        repr(message) == ""
    )

    message2 = checks.Error("some error", level=100, id="tests.checks.E001", obj=obj)
    assert message == message2

    message3 = checks.Error("some error", level=101, id="tests.checks.E001", obj=obj)
    assert message != message3
github mozilla-services / python-dockerflow / tests / flask / test_flask.py View on Github external
def test_check_message():
    message = checks.Error("some error", level=100, id="tests.checks.E001")
    assert str(message) == "?: (tests.checks.E001) some error"
    assert message.is_serious()

    obj = "test"
    message = checks.Error("some error", level=100, id="tests.checks.E001", obj=obj)
    assert str(message) == "test: (tests.checks.E001) some error"
    assert (
        repr(message) == ""
    )

    message2 = checks.Error("some error", level=100, id="tests.checks.E001", obj=obj)
    assert message == message2

    message3 = checks.Error("some error", level=101, id="tests.checks.E001", obj=obj)
    assert message != message3
github mozilla-services / python-dockerflow / tests / flask / test_flask.py View on Github external
def test_check_message():
    message = checks.Error("some error", level=100, id="tests.checks.E001")
    assert str(message) == "?: (tests.checks.E001) some error"
    assert message.is_serious()

    obj = "test"
    message = checks.Error("some error", level=100, id="tests.checks.E001", obj=obj)
    assert str(message) == "test: (tests.checks.E001) some error"
    assert (
        repr(message) == ""
    )

    message2 = checks.Error("some error", level=100, id="tests.checks.E001", obj=obj)
    assert message == message2

    message3 = checks.Error("some error", level=101, id="tests.checks.E001", obj=obj)
    assert message != message3