asset-class-comparison / tests /unit /test_fd_utils.py
prasanth.thangavel
First commit of the app
2aaf2a2
raw
history blame
348 Bytes
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')))
from utils import fd_utils
from datetime import date
def test_calculate_fd_returns():
result = fd_utils.calculate_fd_returns(1000, 0.05, date(2020, 1, 1), date(2021, 1, 1))
# 1 year at 5% interest
assert abs(result - 1050) < 1