Skip to content

Commit

Permalink
Add a check for sendBroadcast API command with nonexisting address
Browse files Browse the repository at this point in the history
  • Loading branch information
g1itch authored and Lee Miller committed Jul 26, 2022
1 parent 1425147 commit f311d9d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/tests/test_api.py
Expand Up @@ -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
Expand Down

0 comments on commit f311d9d

Please sign in to comment.