add test for checking db records when generating keys above the batch threshold

This commit is contained in:
Victor Shyba 2018-10-10 20:47:11 -03:00 committed by Lex Berezhny
parent b19fd8ed85
commit 52b7bb0fce

View file

@ -42,6 +42,12 @@ class TestHierarchicalDeterministicAccount(unittest.TestCase):
addresses = yield account.get_addresses() addresses = yield account.get_addresses()
self.assertEqual(len(addresses), 26) self.assertEqual(len(addresses), 26)
@defer.inlineCallbacks
def test_generate_keys_over_batch_threshold_saves_it_properly(self):
yield self.account.receiving.generate_keys(0, 200)
records = yield self.account.receiving.get_address_records()
self.assertEqual(201, len(records))
@defer.inlineCallbacks @defer.inlineCallbacks
def test_ensure_address_gap(self): def test_ensure_address_gap(self):
account = self.account account = self.account