Exemple #1
0
def test_view_value_only():
    """We test the view with a value only

    - The progressbar is shown with a value of 50
    - No message is shown
    """
    progress = ProgressExt(
        value=50,
        message="",
    )
    return TestApp(
        test_view_value_only,
        progress.view(),
    )
Exemple #2
0
def test_view_none():
    """We test the view with no message or value

    - No progressbar is shown
    - No message is shown
    """
    progress = ProgressExt(
        value=0,
        message="",
    )
    return TestApp(
        test_view_none,
        progress.view(),
    )
Exemple #3
0
def test_view_message_only():
    """We test the view with a message only

    - The progress bar is active with no value
    - The message is stated
    - The bar color is the blue *info* color
    """
    progress = ProgressExt(
        value=0,
        message="hello world",
    )
    return TestApp(
        test_view_message_only,
        progress.view(),
    )
Exemple #4
0
def test_view_value_and_message():
    """We test the view with a value and a message

    - The progress bar is active with the value 50
    - The message hello world is visible
    - The bar color is the blue *info* color
    """
    progress = ProgressExt(
        value=50,
        message="hello world",
    )
    return TestApp(
        test_view_value_and_message,
        progress.view(),
    )
Exemple #5
0
def test_bar_color():
    """We test the view with a value and a message

    - The progress bar is active with the value 50
    - The message hello world is visible
    - The bar color is the green *success* color
    """
    progress = ProgressExt(
        value=50,
        message="hello world",
        bar_color="success",
    )
    return TestApp(
        test_bar_color,
        progress.view(),
    )