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

@ -173,6 +173,9 @@ def test_plugin_bulksms_edge_cases(mock_post):
assert obj.notify(
body='body', title='title', notify_type=NotifyType.INFO) is True
# We know there are 4 targets
assert len(obj) == 4
# Test our call count
assert mock_post.call_count == 4
@ -205,3 +208,9 @@ def test_plugin_bulksms_edge_cases(mock_post):
['+15551231234', '+15555555555', '@group', '@12'])))
assert 'batch=no' in obj.url()
# With our batch in place, our calculations are different
obj = Apprise.instantiate(
'bulksms://{}:{}@{}?batch=y'.format(user, pwd, '/'.join(targets)))
# 2 groups and 2 phones are lumped together
assert len(obj) == 3