mirror of
https://github.com/caronc/apprise.git
synced 2025-08-10 16:58:00 +02:00
Added deprecate and trace logging directives
This commit is contained in:
@ -143,11 +143,19 @@ def test_apprise():
|
||||
# We fail whenever we're initialized
|
||||
raise TypeError()
|
||||
|
||||
def url(self):
|
||||
# Support URL
|
||||
return ''
|
||||
|
||||
class GoodNotification(NotifyBase):
|
||||
def __init__(self, **kwargs):
|
||||
super(GoodNotification, self).__init__(
|
||||
notify_format=NotifyFormat.HTML, **kwargs)
|
||||
|
||||
def url(self):
|
||||
# Support URL
|
||||
return ''
|
||||
|
||||
def notify(self, **kwargs):
|
||||
# Pretend everything is okay
|
||||
return True
|
||||
@ -190,17 +198,29 @@ def test_apprise():
|
||||
# Pretend everything is okay
|
||||
raise TypeError()
|
||||
|
||||
def url(self):
|
||||
# Support URL
|
||||
return ''
|
||||
|
||||
class RuntimeNotification(NotifyBase):
|
||||
def notify(self, **kwargs):
|
||||
# Pretend everything is okay
|
||||
raise RuntimeError()
|
||||
|
||||
def url(self):
|
||||
# Support URL
|
||||
return ''
|
||||
|
||||
class FailNotification(NotifyBase):
|
||||
|
||||
def notify(self, **kwargs):
|
||||
# Pretend everything is okay
|
||||
return False
|
||||
|
||||
def url(self):
|
||||
# Support URL
|
||||
return ''
|
||||
|
||||
# Store our bad notification in our schema map
|
||||
SCHEMA_MAP['throw'] = ThrowNotification
|
||||
|
||||
@ -224,6 +244,11 @@ def test_apprise():
|
||||
def __init__(self, **kwargs):
|
||||
# Pretend everything is okay
|
||||
raise TypeError()
|
||||
|
||||
def url(self):
|
||||
# Support URL
|
||||
return ''
|
||||
|
||||
SCHEMA_MAP['throw'] = ThrowInstantiateNotification
|
||||
|
||||
# Reset our object
|
||||
@ -394,6 +419,10 @@ def test_apprise_notify_formats(tmpdir):
|
||||
# Pretend everything is okay
|
||||
return True
|
||||
|
||||
def url(self):
|
||||
# Support URL
|
||||
return ''
|
||||
|
||||
class HtmlNotification(NotifyBase):
|
||||
|
||||
# set our default notification format
|
||||
@ -406,6 +435,10 @@ def test_apprise_notify_formats(tmpdir):
|
||||
# Pretend everything is okay
|
||||
return True
|
||||
|
||||
def url(self):
|
||||
# Support URL
|
||||
return ''
|
||||
|
||||
class MarkDownNotification(NotifyBase):
|
||||
|
||||
# set our default notification format
|
||||
@ -418,6 +451,10 @@ def test_apprise_notify_formats(tmpdir):
|
||||
# Pretend everything is okay
|
||||
return True
|
||||
|
||||
def url(self):
|
||||
# Support URL
|
||||
return ''
|
||||
|
||||
# Store our notifications into our schema map
|
||||
SCHEMA_MAP['text'] = TextNotification
|
||||
SCHEMA_MAP['html'] = HtmlNotification
|
||||
|
Reference in New Issue
Block a user