Return target count from len(Service) calls (#874)

This commit is contained in:
Chris Caron
2023-05-12 22:05:46 -04:00
committed by GitHub
parent e83cba66a6
commit c542ab23bf
64 changed files with 748 additions and 61 deletions

View File

@ -299,8 +299,8 @@ def test_plugin_smseagle_edge_cases(mock_post):
aobj = Apprise()
assert aobj.add(
"smseagles://token@localhost:231/{}".format(target))
assert len(aobj) == 1
assert aobj.notify(title=title, body=body)
assert mock_post.call_count == 1
details = mock_post.call_args_list[0]
@ -315,8 +315,8 @@ def test_plugin_smseagle_edge_cases(mock_post):
assert aobj.add(
"smseagles://token@localhost:231/{}?status=Yes".format(
target))
assert len(aobj) == 1
assert aobj.notify(title=title, body=body)
assert mock_post.call_count == 1
details = mock_post.call_args_list[0]
@ -348,6 +348,8 @@ def test_plugin_smseagle_result_set(mock_post):
aobj.add(
'smseagle://token@10.0.0.112:8080/+12512222222/+12513333333/'
'12514444444?batch=yes')
# In a batch mode we can shove them all into 1 call
assert len(aobj[0]) == 1
assert aobj.notify(title=title, body=body)
@ -386,6 +388,7 @@ def test_plugin_smseagle_result_set(mock_post):
aobj.add(
'smseagle://token@10.0.0.112:8080/#group/Contact/'
'123456789?batch=no')
assert len(aobj[0]) == 3
assert aobj.notify(title=title, body=body)
@ -463,6 +466,8 @@ def test_plugin_smseagle_result_set(mock_post):
'smseagle://token@10.0.0.112:8080/513333333/#group1/@contact1/'
'contact2/12514444444?batch=yes')
# contacts and numbers can be combined and is calculated in batch response
assert len(aobj[0]) == 3
assert aobj.notify(title=title, body=body)
# There is a unique post to each (group, contact x2, and phone x2)