|
1 | 1 | import json |
| 2 | +import pandas as pd |
2 | 3 | from loop_to_python_api.api import ( |
3 | 4 | initialize_exception_handlers, |
4 | 5 | generate_prediction, |
|
7 | 8 | get_dose_recommendations, |
8 | 9 | get_glucose_effect_velocity, |
9 | 10 | get_glucose_effect_velocity_dates, |
10 | | - get_glucose_velocity_values_and_dates, |
| 11 | + get_glucose_effect_velocity_and_dates, |
11 | 12 | get_active_carbs, |
12 | 13 | get_active_insulin, |
13 | 14 | percent_absorption_at_percent_time, |
@@ -79,14 +80,13 @@ def test_get_glucose_effect_velocity_dates(): |
79 | 80 |
|
80 | 81 |
|
81 | 82 | def test_get_glucose_effect_velocity_values_and_dates(): |
82 | | - prediction_input = get_generate_prediction_input() |
83 | | - values, dates = get_glucose_velocity_values_and_dates(prediction_input) |
| 83 | + loop_algorithm_input = get_loop_algorithm_input() |
| 84 | + values, dates = get_glucose_effect_velocity_and_dates(loop_algorithm_input) |
84 | 85 |
|
85 | 86 | # Assertions to check the types |
86 | 87 | assert isinstance(values, list), "The prediction values should be a list." |
87 | 88 | assert isinstance(dates, list), "The prediction dates should be a list." |
88 | 89 | assert all(isinstance(value, (int, float)) for value in values), "All prediction values should be integers or floats." |
89 | | - assert all(isinstance(date, str) for date in dates), "All prediction dates should be strings." |
90 | 90 |
|
91 | 91 |
|
92 | 92 | def test_get_active_carbs(): |
|
0 commit comments