diff options
Diffstat (limited to 'tests/unit/test_commands_transaction.py')
| -rw-r--r-- | tests/unit/test_commands_transaction.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/test_commands_transaction.py b/tests/unit/test_commands_transaction.py index 5f455cb..61a09ab 100644 --- a/tests/unit/test_commands_transaction.py +++ b/tests/unit/test_commands_transaction.py @@ -192,6 +192,14 @@ class TestTxAdd(unittest.TestCase): self.assertEqual(rc, 0) client.request.assert_not_called() # dry-run wins: no search, no write + def test_tx_add_handler_registered_is_cmd_add(self): + # Guard the decorator placement: the @registry.command must wrap cmd_add, + # not a helper defined between the decorator and the def (a misplacement + # unit tests calling cmd_add directly would miss, but CLI dispatch hits). + from firefly_cli import registry + h = next(c.handler for c in registry.all_commands() if c.name == "tx add") + self.assertIs(h, tx.cmd_add) + def test_from_id_resolves_by_id_not_name(self): # --to-id targets an ambiguous account by numeric id (ISSUES.md #2). ctx, client, resolver = make_ctx() |
