+ buy.reset_mock()
+ wait.reset_mock()
+ sell.reset_mock()
+ with self.subTest(action="print_balances"),\
+ mock.patch("helper.print_balances") as print_balances:
+ helper.main_process_market("user", "print_balances")
+
+ buy.assert_not_called()
+ wait.assert_not_called()
+ sell.assert_not_called()
+ print_balances.assert_called_once_with("user")
+
+ with self.subTest(action="print_orders"),\
+ mock.patch("helper.print_orders") as print_orders:
+ helper.main_process_market("user", "print_orders")
+
+ buy.assert_not_called()
+ wait.assert_not_called()
+ sell.assert_not_called()
+ print_orders.assert_called_once_with("user")
+
+ with self.subTest(action="unknown"),\
+ self.assertRaises(NotImplementedError):
+ helper.main_process_market("user", "unknown")
+