Added address length check

This commit is contained in:
Dmitri Bogomolov 2018-08-02 17:15:05 +03:00
parent c8a781c7c5
commit 2bbda63b9c
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
1 changed files with 2 additions and 0 deletions

View File

@ -100,6 +100,8 @@ class TestAPI(TestProcessProto):
addr = self._add_random_address('random_1')
self.assertRegexpMatches(addr, r'^BM-')
self.assertRegexpMatches(addr[3:], r'[a-zA-Z1-9]+$')
# Whitepaper says "around 36 character"
self.assertLessEqual(len(addr[3:]), 40)
self.assertEqual(self.api.deleteAddress(addr), 'success')
def test_addressbook(self):