mirror of https://github.com/caronc/apprise
SignalAPI Status Display
parent
31caff1ac9
commit
3d40a461ca
|
@ -158,7 +158,7 @@ class NotifySignalAPI(NotifyBase):
|
||||||
'status': {
|
'status': {
|
||||||
'name': _('Show Status'),
|
'name': _('Show Status'),
|
||||||
'type': 'bool',
|
'type': 'bool',
|
||||||
'default': False,
|
'default': True,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -490,6 +490,6 @@ class NotifySignalAPI(NotifyBase):
|
||||||
|
|
||||||
# Get status switch
|
# Get status switch
|
||||||
results['status'] = \
|
results['status'] = \
|
||||||
parse_bool(results['qsd'].get('status', False))
|
parse_bool(results['qsd'].get('status', True))
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|
|
@ -199,7 +199,7 @@ def test_plugin_signal_edge_cases(request_mock):
|
||||||
details = request_mock.call_args_list[0]
|
details = request_mock.call_args_list[0]
|
||||||
assert details[0][0] == 'https://localhost:231/v2/send'
|
assert details[0][0] == 'https://localhost:231/v2/send'
|
||||||
payload = loads(details[1]['data'])
|
payload = loads(details[1]['data'])
|
||||||
assert payload['message'] == 'My Title\r\ntest body'
|
assert payload['message'] == '[i] My Title\r\ntest body'
|
||||||
|
|
||||||
# Reset our mock object
|
# Reset our mock object
|
||||||
request_mock.reset_mock()
|
request_mock.reset_mock()
|
||||||
|
@ -279,7 +279,7 @@ def test_plugin_signal_based_on_feedback(request_mock):
|
||||||
aobj = Apprise()
|
aobj = Apprise()
|
||||||
aobj.add(
|
aobj.add(
|
||||||
'signal://10.0.0.112:8080/+12512222222/+12513333333/'
|
'signal://10.0.0.112:8080/+12512222222/+12513333333/'
|
||||||
'12514444444?batch=yes')
|
'12514444444?batch=yes&status=no')
|
||||||
|
|
||||||
assert aobj.notify(title=title, body=body)
|
assert aobj.notify(title=title, body=body)
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ def test_plugin_signal_based_on_feedback(request_mock):
|
||||||
aobj = Apprise()
|
aobj = Apprise()
|
||||||
aobj.add(
|
aobj.add(
|
||||||
'signal://10.0.0.112:8080/+12512222222/+12513333333/'
|
'signal://10.0.0.112:8080/+12512222222/+12513333333/'
|
||||||
'12514444444?batch=no')
|
'12514444444?batch=no&status=no')
|
||||||
|
|
||||||
assert aobj.notify(title=title, body=body)
|
assert aobj.notify(title=title, body=body)
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ def test_plugin_signal_based_on_feedback(request_mock):
|
||||||
aobj = Apprise()
|
aobj = Apprise()
|
||||||
aobj.add(
|
aobj.add(
|
||||||
'signal://10.0.0.112:8080/+12513333333/@group1/@group2/'
|
'signal://10.0.0.112:8080/+12513333333/@group1/@group2/'
|
||||||
'12514444444?batch=yes')
|
'12514444444?batch=yes&status=no')
|
||||||
|
|
||||||
assert aobj.notify(title=title, body=body)
|
assert aobj.notify(title=title, body=body)
|
||||||
|
|
||||||
|
@ -365,7 +365,7 @@ def test_notify_signal_plugin_attachments(request_mock):
|
||||||
|
|
||||||
obj = Apprise.instantiate(
|
obj = Apprise.instantiate(
|
||||||
'signal://10.0.0.112:8080/+12512222222/+12513333333/'
|
'signal://10.0.0.112:8080/+12512222222/+12513333333/'
|
||||||
'12514444444?batch=no')
|
'12514444444?batch=no&status=no')
|
||||||
assert isinstance(obj, NotifySignalAPI)
|
assert isinstance(obj, NotifySignalAPI)
|
||||||
|
|
||||||
# Test Valid Attachment
|
# Test Valid Attachment
|
||||||
|
|
Loading…
Reference in New Issue