ascii() lookup added to plugin base

This commit is contained in:
Chris Caron
2024-05-19 15:07:45 -04:00
parent 9569fe1c52
commit e98f65790c
4 changed files with 36 additions and 4 deletions

View File

@ -957,6 +957,18 @@ def test_apprise_asset(tmpdir):
# None is the default
assert a.color(NotifyType.INFO) == '#3AA3E3'
# Invalid Type
with pytest.raises(ValueError):
# The exception we expect since dict is not supported
a.color(NotifyType.INFO, dict)
# Test our ASCII mappings
assert a.ascii('invalid') == '[?]'
assert a.ascii(NotifyType.INFO) == '[i]'
assert a.ascii(NotifyType.SUCCESS) == '[+]'
assert a.ascii(NotifyType.WARNING) == '[~]'
assert a.ascii(NotifyType.FAILURE) == '[!]'
# Invalid Type
with pytest.raises(ValueError):
# The exception we expect since dict is not supported