Add a check for sendBroadcast API command with nonexisting address

This commit is contained in:
Dmitri Bogomolov 2021-11-11 15:32:55 +02:00 committed by Lee Miller
parent 142514755f
commit f311d9d25c
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -420,6 +420,13 @@ class TestAPI(TestAPIProto):
finally: finally:
self.assertEqual(self.api.deleteAddress(addr), 'success') 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): def test_chan(self):
"""Testing chan creation/joining""" """Testing chan creation/joining"""
# Create chan with known address # Create chan with known address