From 52b7bb0fce9f5a72c2acb1d264f6d039929b1f05 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 10 Oct 2018 20:47:11 -0300 Subject: [PATCH] add test for checking db records when generating keys above the batch threshold --- tests/unit/test_account.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unit/test_account.py b/tests/unit/test_account.py index 912c3bbce..2e840c20b 100644 --- a/tests/unit/test_account.py +++ b/tests/unit/test_account.py @@ -42,6 +42,12 @@ class TestHierarchicalDeterministicAccount(unittest.TestCase): addresses = yield account.get_addresses() 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 def test_ensure_address_gap(self): account = self.account