Skip to content

Commit 09af1a3

Browse files
authored
Merge pull request #501 from Viveksati5143/main
feat: made it beginner friendly
2 parents 7106960 + fc53cec commit 09af1a3

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

tests/test_main.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
import sys
2+
import os
3+
4+
current_dir = os.path.dirname(os.path.abspath(__file__))
5+
6+
sys.path.insert(0, os.path.join(current_dir, '..'))
7+
18
from main import app
29
from fastapi import status
310
from fastapi.testclient import TestClient
@@ -1430,13 +1437,13 @@ def test_modified_internal_rate_of_return():
14301437
)
14311438
assert response.status_code == status.HTTP_200_OK
14321439

1433-
assert response.json() == {
1434-
"Tag": "Modified internal rate",
1435-
"Ending cash flow": 500000,
1436-
"Initial cash flow": -300000,
1437-
"Number of periods": 5,
1438-
"Modified internal rate of return": "12.04%",
1439-
}
1440+
assert response.json() == {
1441+
"Tag": "Modified internal rate",
1442+
"Ending cash flow": 500000,
1443+
"Initial cash flow": -300000,
1444+
"Number of periods": 5,
1445+
"Modified internal rate of return": "12.04%",
1446+
}
14401447

14411448

14421449

0 commit comments

Comments
 (0)