@@ -23,7 +23,7 @@ def test_load_transactions_remove_reverted(self) -> None:
2323 result = plugin .load (US ())
2424 assert len (result ) == 35
2525
26- def test_handle_exchange_transaction (self ):
26+ def test_handle_exchange_transaction (self ) -> None :
2727 plugin = InputPlugin (
2828 account_holder = "tester" ,
2929 in_csv_file = "input/test_crypto_com_app.csv" ,
@@ -56,6 +56,8 @@ def test_handle_exchange_transaction(self):
5656 assert out_transaction .timestamp == "2022-06-15 21:58:00+0000"
5757 assert out_transaction .transaction_type .lower () == Keyword .SELL .value .lower ()
5858 assert out_transaction .spot_price == "0.11888081892640755"
59+ assert out_transaction .crypto_out_no_fee is not None
60+ assert out_transaction .crypto_out_with_fee is not None
5961 assert RP2Decimal (out_transaction .crypto_out_no_fee ) == RP2Decimal ("259.8504164" )
6062 assert RP2Decimal (out_transaction .crypto_out_with_fee ) == RP2Decimal ("259.8504164" )
6163 assert out_transaction .crypto_fee == "0"
@@ -71,15 +73,16 @@ def test_handle_exchange_transaction(self):
7173 assert in_transaction .fiat_in_no_fee == "30.8912303"
7274 assert in_transaction .crypto_fee == "0"
7375
74- def test_handle_intra_transaction (self ):
76+ def test_handle_intra_transaction (self ) -> None :
7577 plugin = InputPlugin (
7678 account_holder = "tester" ,
7779 in_csv_file = "input/test_crypto_com_app.csv" ,
7880 native_fiat = "USD" ,
7981 )
8082
8183 transaction = CryptoComAppTransaction (
82- raw_data = "11/21/2022 22:08,Withdraw ETH (ERC20),ETH,-0.3877,USD,421.5213882,USD,421.5213882,crypto_withdrawal,0x1646a7c9f57f5f543c498f5ebff14dab16f9c9b09dbfb50405622564b8c62762" ,
84+ raw_data = "11/21/2022 22:08,Withdraw ETH (ERC20),ETH,-0.3877,USD,421.5213882,USD,421.5213882,"
85+ "crypto_withdrawal,0x1646a7c9f57f5f543c498f5ebff14dab16f9c9b09dbfb50405622564b8c62762" ,
8386 time = plugin .format_time ("11/21/2022 22:08" ),
8487 description = "Withdraw ETH (ERC20)" ,
8588 currency = "ETH" ,
@@ -103,7 +106,7 @@ def test_handle_intra_transaction(self):
103106 assert RP2Decimal (result .crypto_sent ) == RP2Decimal ("0.3877" )
104107 assert RP2Decimal (result .crypto_received ) == RP2Decimal ("0.3877" )
105108
106- def test_handle_in_transaction (self ):
109+ def test_handle_in_transaction (self ) -> None :
107110 plugin = InputPlugin (
108111 account_holder = "tester" ,
109112 in_csv_file = "input/test_crypto_com_app.csv" ,
@@ -134,7 +137,7 @@ def test_handle_in_transaction(self):
134137 assert result .fiat_in_no_fee == "25.0"
135138 assert result .crypto_fee == "0"
136139
137- def test_handle_out_transaction (self ):
140+ def test_handle_out_transaction (self ) -> None :
138141 plugin = InputPlugin (
139142 account_holder = "tester" ,
140143 in_csv_file = "input/test_crypto_com_app.csv" ,
@@ -165,7 +168,7 @@ def test_handle_out_transaction(self):
165168 assert result .crypto_fee == "0"
166169 assert result .crypto_out_with_fee == "0.0259378"
167170
168- def test_remove_ignored_transactions (self ):
171+ def test_remove_ignored_transactions (self ) -> None :
169172 plugin = InputPlugin (
170173 account_holder = "tester" ,
171174 in_csv_file = "input/test_crypto_com_app.csv" ,
@@ -201,7 +204,7 @@ def test_remove_ignored_transactions(self):
201204 assert len (result ) == 1
202205 assert result [0 ].transaction_kind == "referral_gift"
203206
204- def test_revert_reverted_transactions (self ):
207+ def test_revert_reverted_transactions (self ) -> None :
205208 plugin = InputPlugin (
206209 account_holder = "tester" ,
207210 in_csv_file = "input/test_crypto_com_app.csv" ,
@@ -236,7 +239,7 @@ def test_revert_reverted_transactions(self):
236239 result = plugin .remove_reverted_csv_transactions (transactions )
237240 assert len (result ) == 0
238241
239- def test_date_conversion (self ):
242+ def test_date_conversion (self ) -> None :
240243 # Test the date conversion from string to datetime
241244 in_date_str = "2/29/2024 6:42"
242245 expected_date = "2024-02-29T06:42:00+00:00"
0 commit comments