From f311d9d25c5dfdf28eaae98d1581992aed433128 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Thu, 11 Nov 2021 15:32:55 +0200 Subject: [PATCH] Add a check for sendBroadcast API command with nonexisting address --- src/tests/test_api.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tests/test_api.py b/src/tests/test_api.py index 835b4afbfa..57ec196df8 100644 --- a/src/tests/test_api.py +++ b/src/tests/test_api.py @@ -420,6 +420,13 @@ def test_send_broadcast(self): finally: self.assertEqual(self.api.deleteAddress(addr), 'success') + # sending from an address without private key + # (Bitmessage new releases/announcements) + result = self.api.sendBroadcast( + 'BM-GtovgYdgs7qXPkoYaRgrLFuFKz1SFpsw', + base64.encodestring('test_subject'), msg) + self.assertRegexpMatches(result, r'^API Error 0013:') + def test_chan(self): """Testing chan creation/joining""" # Create chan with known address