summaryrefslogtreecommitdiff
path: root/test_trade_queue.py
diff options
context:
space:
mode:
authoruvok2025-04-18 17:44:34 +0200
committeruvok2025-04-18 17:44:34 +0200
commit3346c665e47fcda5ef3216d66174eae815fcd3cd (patch)
tree0b6ccd852e70d3b0142b2632639b764fdfabf1c0 /test_trade_queue.py
parentd12498351659dc47063b42df51d1756bcb2bd4fd (diff)
Addand use TradeNotFound
Diffstat (limited to 'test_trade_queue.py')
-rw-r--r--test_trade_queue.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test_trade_queue.py b/test_trade_queue.py
index 6afd599..f43487d 100644
--- a/test_trade_queue.py
+++ b/test_trade_queue.py
@@ -2,6 +2,7 @@ from decimal import Decimal
import unittest
from datetime import datetime
+from exceptions import TradeNotFound
from trade_queue import FIFOQueue
@@ -157,7 +158,7 @@ class TestFIFOQueueRemove(unittest.TestCase):
Test trying to remove a trade when no match is found.
"""
# No such date
- with self.assertRaises(ValueError) as context:
+ with self.assertRaises(TradeNotFound) as context:
self.fifo_queue.remove(lambda t: t.date == "2024-04-17")
self.assertIn("No trade matches the given predicate.", str(context.exception))
# Ensure no trade is removed