Added deprecate and trace logging directives

This commit is contained in:
Chris Caron
2019-04-04 23:50:30 -04:00
parent 02dd6dd8b3
commit de5c5e4331
18 changed files with 269 additions and 69 deletions

View File

@ -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