diff --git a/app.py b/app.py index 1202030..1063ae1 100644 --- a/app.py +++ b/app.py @@ -32,6 +32,9 @@ def calculate_most_points_get(): result_dict = {} contest = 'total_lb_points' points = get_most_position_points(contest_list[contest]['position'], + contest_list[contest]['stat'], + OWNERS, + '2023', current_week() - 1) result_dict['contest_results'] = order_positions_by_points(points) result_dict['contest'] = contest diff --git a/fantasy_app/test_app.py b/fantasy_app/test_app.py deleted file mode 100644 index f99b04e..0000000 --- a/fantasy_app/test_app.py +++ /dev/null @@ -1,3 +0,0 @@ -import pytest -def test_addition(): - assert 1 + 2 == 3 \ No newline at end of file diff --git a/fantasy_app/test_scores.py b/fantasy_app/test_scores.py new file mode 100644 index 0000000..e69de29 diff --git a/test_app.py b/test_app.py new file mode 100644 index 0000000..c889f4e --- /dev/null +++ b/test_app.py @@ -0,0 +1,13 @@ +from app import app + +def test_hello1_route(): + response = app.test_client().get('/') + json_response = response.get_json() + assert json_response == 'This is working' + assert response.status_code == 200 + +def test_calculate_most_points_get(): + response = app.test_client().get('/most_points_get') + json_response = response.get_json() + assert list(json_response.keys()) == ['contest', 'contest_results'] + assert response.status_code == 200 \ No newline at end of file