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

@ -225,9 +225,15 @@ def test_plugin_smtp2go_attachments(mock_post):
'user1@example.com/user2@example.com?batch=yes'.format(apikey))
assert isinstance(obj, NotifySMTP2Go)
# objects will be combined into a single post in batch mode
assert len(obj) == 1
# Force our batch to break into separate messages
obj.default_batch_size = 1
# We'll send 2 messages
# We'll send 2 messages now
assert len(obj) == 2
mock_post.reset_mock()
assert obj.notify(