def assertNotNone(expr, message=None):
    """
    Assert that expr is not None.

    :param expr: expression.
    :param message: Message set to raised Exception
    :raises: TestStepFail if expr is None.
    """
    if expr is None:
        raise TestStepFail(
            format_message(message) if message is not None else "Assert: %s == None" % str(expr))
Assert that expr is not None.

    :param expr: expression.
    :param message: Message set to raised Exception
    :raises: TestStepFail if expr is None.