24 lines
532 B
Python
24 lines
532 B
Python
from myfasthtml.controls.IconsHelper import IconsHelper
|
|
|
|
|
|
def test_existing_icon():
|
|
IconsHelper.reset()
|
|
assert IconsHelper.get(True) is not None
|
|
|
|
|
|
def test_dynamic_icon():
|
|
IconsHelper.reset()
|
|
assert IconsHelper.get("add20_filled") is not None
|
|
|
|
|
|
def test_unknown_icon():
|
|
IconsHelper.reset()
|
|
assert IconsHelper.get("does_not_exist") is None
|
|
|
|
|
|
|
|
def test_dynamic_icon_by_package():
|
|
IconsHelper.reset()
|
|
assert IconsHelper.get("add20_filled", "fa") is None
|
|
assert IconsHelper.get("add20_filled", "fluent") is not None
|