mirror of
https://github.com/caronc/apprise.git
synced 2025-08-10 08:47:53 +02:00
ascii() lookup added to plugin base
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user