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
parent 784562ca01
commit 006632f5d1
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -420,6 +420,13 @@ class TestAPI(TestAPIProto):
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