Skip to content

Conversation

@aorumbayev
Copy link
Contributor

@aorumbayev aorumbayev commented Dec 2, 2025

Proposed Changes

  • Generating kmd test stubs using polytest and latest config

@aorumbayev aorumbayev changed the title test: generate KMD client polytest tubs test: generate KMD client polytest stubs Dec 2, 2025
@aorumbayev aorumbayev force-pushed the decoupling-indexer-polytest branch from f751407 to 0800a7d Compare December 2, 2025 22:46
- Add 23 KMD client endpoint tests aligned with TypeScript implementation
- Fix init_wallet_handle method name in kmd_account_manager.py
- Fix manual test_key_management.py (remove non-existent display_mnemonic param)
- Add JSON snapshots for KMD endpoints with recordings
- Most tests skipped due to missing mock server recordings (require localnet)
@aorumbayev aorumbayev force-pushed the decoupling-kmd-polytest branch from 3993efa to ed6b4a0 Compare December 2, 2025 22:47
@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit_abi
   _abi_type.py4524390%23, 61–65, 69–75, 78, 81, 101, 109, 140, 166, 169, 181, 190–193, 214, 220, 229, 245, 266–268, 271, 282, 313, 366, 387, 440, 491, 504, 530, 589, 601, 609, 639
   _arc32_to_arc56.py105298%110, 127
   _arc56_serde.py108397%31, 36, 154
   arc32.py96892%201–210
   arc56.py4562195%87, 100, 154, 318, 339, 349, 362–364, 383, 388, 695–697, 712, 715–717, 730–731, 733–734
src/algokit_algod_client
   client.py69422068%63, 69, 75, 79, 85, 93, 96–101, 116, 137–148, 183, 250, 276–277, 291, 342, 358, 376, 392, 422, 452, 489, 519, 528–546, 576, 603, 636, 646–669, 699, 714, 733, 751, 770, 797, 807–827, 854, 881, 908, 918–941, 955–985, 1012, 1039, 1072, 1083–1103, 1113–1133, 1180, 1210, 1254, 1264–1294, 1305–1335, 1344–1362, 1379, 1383, 1429, 1434, 1436, 1441, 1445, 1450, 1521, 1534–1539, 1544, 1547–1551, 1558–1570, 1578–1583, 1608–1618, 1624–1626
   exceptions.py431370%14, 18–21, 27, 31–32, 44–48
src/algokit_algod_client/models
   _block.py1473278%45–47, 55–61, 67–69, 78–84, 88–95, 100, 112–114
   _ledger_state_delta.py1741591%48–52, 56–62, 68–70
   _serde_helpers.py1395362%19, 21, 37, 49–51, 56, 60–61, 63, 70, 74–75, 82, 86, 93, 103–110, 114–123, 132–150, 160, 172, 182
src/algokit_common
   address.py19479%7, 10, 15, 21
src/algokit_common/serde
   _core.py3465285%86, 168, 187, 269–298, 303, 316, 328, 341, 345, 348–349, 391–394, 414, 419, 439–440, 447–448, 450, 456–457, 497, 525–526, 563, 571, 577, 586, 592, 601, 607
   _primitives.py732368%5–7, 11–13, 17, 23, 35–37, 41–43, 47–49, 55, 60–61, 122, 126, 130
src/algokit_indexer_client
   client.py67125662%62, 68, 74, 78, 82–84, 91–104, 115, 128–147, 176, 199, 202, 205, 208, 224, 245, 248, 251, 254, 270, 290, 293, 296, 312, 333, 336, 339, 342, 358, 379, 382, 385, 388, 404, 436, 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, 475, 478, 494, 527, 545, 561, 584, 587, 590, 593, 596, 599, 615, 637, 640, 643, 646, 649, 665, 683, 699, 733, 736, 739, 742, 745, 748, 751, 754, 757, 760, 763, 766, 769, 772, 775, 778, 781, 797, 815, 831, 888, 894, 897, 900, 903, 906, 909, 912, 915, 918, 934, 953, 956, 972, 997, 1003, 1019, 1040, 1046, 1049, 1052, 1055, 1058, 1074, 1101, 1104, 1107, 1110, 1113, 1116, 1119, 1122, 1138, 1176, 1179, 1182, 1185, 1188, 1194, 1197, 1200, 1203, 1206, 1209, 1212, 1215, 1218, 1221, 1224, 1227, 1230, 1246, 1255–1271, 1274–1281, 1351, 1356–1370, 1374, 1377–1381, 1385–1416, 1419–1424, 1428–1457
   exceptions.py431370%14, 18–21, 27, 31–32, 44–48
src/algokit_indexer_client/models
   _serde_helpers.py1399631%18–22, 26, 31, 35–37, 41–51, 55–65, 70, 74–75, 81–88, 93, 103–110, 114–123, 132–150, 159–167, 171–173, 181–184, 192–195
src/algokit_kmd_client
   client.py50333034%61, 67, 73, 77, 81–83, 90–103, 114, 127–146, 188, 198–228, 238–268, 308, 318–348, 358–388, 428, 439–469, 479–509, 519–549, 559–589, 629, 669, 679–709, 737, 750, 790, 800–830, 840–870, 880–910, 920–950, 960–990, 1000–1030, 1039–1057, 1069–1075, 1078–1082, 1086, 1089–1092, 1162, 1167–1181, 1185, 1188–1192, 1196–1227, 1230–1235, 1239–1268
   exceptions.py433714%13–50, 55–59
src/algokit_kmd_client/models
   _serde_helpers.py13910227%18–22, 26, 31, 35–37, 41–51, 55–65, 69–77, 81–88, 93, 103–110, 114–123, 132–150, 159–167, 171–173, 181–184, 192–195
src/algokit_transact/codec
   signed.py35586%18, 20, 23, 39, 43
   transaction.py41295%16, 65
src/algokit_transact/models
   app_call.py32220237%67–81, 85–88, 96, 98, 101, 114, 119, 125, 132–144, 148–251, 295–296, 310–312, 324, 328–330, 339, 352–353, 359–360, 364, 367–373, 376–387, 390–394, 397–400, 403–411, 414–424, 427–434
   state_proof.py1042180%94, 102, 114, 120, 127–138, 144–150
   transaction.py55198%35
src/algokit_transact/ops
   group.py21290%15, 22
   validate.py209399%60, 74, 76
src/algokit_transact/signing
   multisig.py541965%17, 19, 21, 32–45, 60, 66, 68, 73
   types.py28389%10, 14, 24
src/algokit_utils
   _debugging.py1592386%43–45, 48, 57, 65, 84, 88, 97, 134, 182, 184, 212, 217, 224, 230, 255–265, 270
   algorand.py1051487%67–68, 82–83, 113–114, 141–142, 177–178, 325, 348, 364, 383
   config.py781877%23, 30–34, 73–74, 100, 105, 111–116, 141, 149, 151
src/algokit_utils/accounts
   account_manager.py2504383%167, 183–184, 211–216, 254–264, 282, 284, 287, 303–308, 382–384, 413–414, 453, 473–477, 490, 549, 570, 727, 828, 902, 907, 922–923, 947
   kmd_account_manager.py861286%57–63, 106, 110, 134, 172, 179
src/algokit_utils/applications
   abi.py1264763%32, 67, 76–80, 84–85, 105–107, 114–118, 142, 152, 162, 181–182, 194–196, 204–209, 236–245, 260–271
   app_client.py79822372%127, 135, 322–325, 328, 331, 334, 337, 349–352, 355, 358, 361, 364, 376, 385, 394, 397–458, 471–527, 551–553, 570–573, 581–584, 592–595, 603–606, 614–617, 630–633, 646, 742–745, 779, 791, 803, 815, 827, 844, 861, 871, 881, 891, 901, 911, 948–961, 977, 994, 1011, 1028, 1049, 1070, 1160, 1224, 1366, 1432–1433, 1482, 1484, 1490, 1543–1551, 1584–1587, 1590–1593, 1614, 1662, 1727–1729, 1742–1753, 1798, 1815, 1817, 1820, 1822, 1967–1981, 2010, 2023–2025, 2029, 2040–2041, 2075, 2080, 2093–2095, 2098–2111, 2117–2118, 2129–2131, 2133–2134, 2141–2143, 2148–2152, 2159–2164, 2184, 2187
   app_deployer.py2624284%96, 270, 277, 287–292, 295–299, 375–376, 496, 589, 601–615, 627, 632–635, 644, 658, 665, 672, 701, 715–760, 778, 789
   app_factory.py2803089%176, 432, 453, 462, 654, 664, 714, 946, 960–965, 976–977, 1010, 1048, 1066–1067, 1089, 1092, 1120–1136
   app_manager.py2141792%256, 277–278, 347–348, 393–396, 443–444, 476, 504–507, 539, 548
src/algokit_utils/assets
   asset_manager.py1271390%159, 290–291, 300, 306–330, 340
src/algokit_utils/clients
   client_manager.py1785470%77–84, 109, 141–143, 200, 207, 220–221, 232–235, 260, 299, 334–339, 374–376, 408, 429, 450, 495–498, 538–541, 582–585, 622–625, 647–672, 710, 723, 735
   dispenser_api_client.py892078%87, 91, 132–133, 137–140, 181–191, 201–212
src/algokit_utils/errors
   logic_error.py692761%89, 112–150
src/algokit_utils/models
   account.py1061685%36, 126, 134, 142, 163–167, 181–182, 193, 206–208, 213, 218
   amount.py1001387%36, 43, 101, 117–118, 150–153, 156–159
src/algokit_utils/transactions
   composer_resources.py2957674%21, 25, 27, 29, 71, 74, 77, 115, 126, 165, 176, 191, 198–199, 203–210, 235–263, 297, 310–315, 321–323, 329, 371–382, 385–396
   transaction_composer.py7809088%150, 401–404, 422–434, 454, 459, 500–503, 560–570, 603, 665–676, 685, 687, 696, 715, 737, 772, 906, 996, 999, 1247, 1264, 1278, 1298, 1318, 1346, 1349, 1358, 1373, 1382, 1389, 1392, 1416–1417, 1419, 1443–1446, 1494–1500, 1520–1538, 1550, 1552, 1557, 1560–1561, 1567–1572, 1588–1591
   transaction_creator.py79791%394, 427, 482, 520, 557, 590, 688
   transaction_sender.py1781790%105–109, 115, 285, 318, 331–332, 439, 733–738, 743–744, 909
src/algokit_utils/transactions/builders
   app.py57296%163–168
   common.py1251390%86, 152, 154, 176, 183, 187–197, 213–214
   keyreg.py461665%75, 77, 80–81, 86, 89, 92–93, 95, 97–103
   method_call.py1333772%261, 263, 270, 295, 300–311, 316, 331–337, 341–347, 351–355, 359–365, 375–376
TOTAL12733245181% 

Tests Skipped Failures Errors Time
789 43 💤 0 ❌ 0 🔥 1m 53s ⏱️

@aorumbayev aorumbayev merged commit 1cb2c2f into decoupling-indexer-polytest Dec 3, 2025
5 checks passed
@aorumbayev aorumbayev deleted the decoupling-kmd-polytest branch December 3, 2025 12:06
aorumbayev added a commit that referenced this pull request Dec 3, 2025
* test: add indexer client polytest tests

- Add 21 indexer client endpoint tests aligned with TypeScript implementation
- Add test constants for indexer test data (address, app_id, asset_id, txid, round)
- Add JSON snapshots for all indexer endpoints
- Tests use mock server recordings for deterministic testing

* test: add KMD client polytest tests (#224)

- Add 23 KMD client endpoint tests aligned with TypeScript implementation
- Fix init_wallet_handle method name in kmd_account_manager.py
- Fix manual test_key_management.py (remove non-existent display_mnemonic param)
- Add JSON snapshots for KMD endpoints with recordings
- Most tests skipped due to missing mock server recordings (require localnet)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants