From 001eedceed5139bf74fa71be2026f208b66ec05b Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Tue, 30 Sep 2025 20:27:25 -0400 Subject: [PATCH] Format code with black --- make_post_sell/tests/test_crypto_watcher.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/make_post_sell/tests/test_crypto_watcher.py b/make_post_sell/tests/test_crypto_watcher.py index 02d3dc1..def9586 100644 --- a/make_post_sell/tests/test_crypto_watcher.py +++ b/make_post_sell/tests/test_crypto_watcher.py @@ -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)