Assert the buy kept its sats, so only the sale consumed
This commit is contained in:
1 parent
13939d67d3
commit
9d55ee40f9
1 file changed
+4
@@ -206,6 +206,10 @@ class TaxTestCase(unittest.TestCase):
|
|||||||
self.assertEqual(lots[0]["cost_ore_original"], 20050000)
|
self.assertEqual(lots[0]["cost_ore_original"], 20050000)
|
||||||
self.assertEqual(lots[1]["sats_original"], 99900000)
|
self.assertEqual(lots[1]["sats_original"], 99900000)
|
||||||
self.assertEqual(lots[1]["cost_ore_original"], 20000000)
|
self.assertEqual(lots[1]["cost_ore_original"], 20000000)
|
||||||
|
# The buy must not have consumed anything: its sats fee only lowered the
|
||||||
|
# sats it received, so the second lot is untouched.
|
||||||
|
self.assertEqual(lots[0]["sats_remaining"], 0)
|
||||||
|
self.assertEqual(lots[1]["sats_remaining"], 99900000)
|
||||||
# Proceeds 300 000 kr minus the 1 000 kr fee, cost 200 500 kr (FIFO).
|
# Proceeds 300 000 kr minus the 1 000 kr fee, cost 200 500 kr (FIFO).
|
||||||
self.assertEqual(tax.report(2024)["totals"]["gevinst_ore"], 9850000)
|
self.assertEqual(tax.report(2024)["totals"]["gevinst_ore"], 9850000)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user