Beispiel #1
0
def test_save_cdn_resources():
    alert = Alert('# Save test')

    sio = StringIO()
    alert.save(sio, resources='cdn')
    sio.seek(0)
    html = sio.read()
    assert re.findall('https://unpkg.com/@holoviz/panel@(.*)/dist/css/alerts.css', html)
Beispiel #2
0
def test_save_inline_resources():
    alert = Alert('# Save test')

    sio = StringIO()
    alert.save(sio, resources='inline')
    sio.seek(0)
    html = sio.read()
    assert '.bk.alert-primary' in html