Format code with black
This commit is contained in:
parent
4063c1a9fa
commit
001eedceed
1 changed files with 7 additions and 14 deletions
|
|
@ -2628,9 +2628,7 @@ class SweepRestockingFeeTests(unittest.TestCase):
|
|||
unsupported_payment.shop_sweep_to_address = "bc1qtest123"
|
||||
unsupported_payment.refund_confirmations = 25 # Sufficient confirmations
|
||||
|
||||
with patch(
|
||||
"make_post_sell.lib.crypto_watcher.log"
|
||||
) as mock_logger:
|
||||
with patch("make_post_sell.lib.crypto_watcher.log") as mock_logger:
|
||||
|
||||
sweep_restocking_fee(
|
||||
self.mock_settings,
|
||||
|
|
@ -2642,7 +2640,8 @@ class SweepRestockingFeeTests(unittest.TestCase):
|
|||
|
||||
# Verify warning was logged using centralized payment_warning method
|
||||
mock_logger.payment_warning.assert_called_once_with(
|
||||
unsupported_payment, "Unsupported coin type for restocking fee sweep: UNSUPPORTED"
|
||||
unsupported_payment,
|
||||
"Unsupported coin type for restocking fee sweep: UNSUPPORTED",
|
||||
)
|
||||
|
||||
# Verify no client calls were made
|
||||
|
|
@ -2664,9 +2663,7 @@ class SweepRestockingFeeTests(unittest.TestCase):
|
|||
mock_doge_client.sendtoaddress.side_effect = Exception("RPC connection error")
|
||||
mock_get_client.return_value = mock_doge_client
|
||||
|
||||
with patch(
|
||||
"make_post_sell.lib.crypto_watcher.log"
|
||||
) as mock_logger:
|
||||
with patch("make_post_sell.lib.crypto_watcher.log") as mock_logger:
|
||||
|
||||
sweep_restocking_fee(
|
||||
self.mock_settings,
|
||||
|
|
@ -2700,9 +2697,7 @@ class SweepRestockingFeeTests(unittest.TestCase):
|
|||
mock_xmr_client._call.side_effect = Exception("Wallet locked")
|
||||
mock_get_client.return_value = mock_xmr_client
|
||||
|
||||
with patch(
|
||||
"make_post_sell.lib.crypto_watcher.log"
|
||||
) as mock_logger:
|
||||
with patch("make_post_sell.lib.crypto_watcher.log") as mock_logger:
|
||||
|
||||
sweep_restocking_fee(
|
||||
self.mock_settings,
|
||||
|
|
@ -2735,9 +2730,7 @@ class SweepRestockingFeeTests(unittest.TestCase):
|
|||
mock_doge_client.sendtoaddress.return_value = "doge_tx_hash_123"
|
||||
mock_get_client.return_value = mock_doge_client
|
||||
|
||||
with patch(
|
||||
"make_post_sell.lib.crypto_watcher.log"
|
||||
) as mock_logger:
|
||||
with patch("make_post_sell.lib.crypto_watcher.log") as mock_logger:
|
||||
|
||||
sweep_restocking_fee(
|
||||
self.mock_settings,
|
||||
|
|
@ -2750,7 +2743,7 @@ class SweepRestockingFeeTests(unittest.TestCase):
|
|||
# Verify success log using centralized sweep_operation method
|
||||
# There should be two calls: one for sending fee and one for sweeping to cold storage
|
||||
self.assertEqual(mock_logger.sweep_operation.call_count, 2)
|
||||
|
||||
|
||||
# Check the second call (sweeping restocking fee)
|
||||
last_call = mock_logger.sweep_operation.call_args_list[1][0]
|
||||
self.assertEqual(last_call[0], self.mock_doge_payment)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue