示例#1
0
def test_alerts(web_fixture):
    """An alert is used to display a message with a specific severity"""

    alert = Alert(web_fixture.view, 'Be careful', 'danger')

    assert alert.get_attribute('class') == 'alert alert-danger'
    assert alert.get_attribute('role') == 'alert'
    [message] = alert.children
    assert message.value == 'Be careful'
示例#2
0
def alerts(fixture):
    """An alert is used to display a message with a specific severity"""

    alert = Alert(fixture.view, 'Be careful', 'danger')

    vassert( alert.get_attribute('class') == 'alert alert-danger' )
    vassert( alert.get_attribute('role') == 'alert' )
    [message] = alert.children
    vassert( message.value == 'Be careful' )