From c86c6ffb18fd8417024218752e34aebde8226629 Mon Sep 17 00:00:00 2001 From: Sermet Pekin Date: Wed, 17 Apr 2024 05:44:37 +0300 Subject: [PATCH] e_Test --- evdspy_test.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 evdspy_test.py diff --git a/evdspy_test.py b/evdspy_test.py new file mode 100644 index 0000000..9fbd30a --- /dev/null +++ b/evdspy_test.py @@ -0,0 +1,31 @@ +from evdspy import * + +from evdspy import get_series, default_start_date_fnc, default_end_date_fnc + + +def get_api_key(): + import os + return os.getenv("EVDS_API_KEY") + + + +def test1(): + setup() + save(get_api_key()) + +def test2(): + df = get_series("TP.ODEMGZS.BDTTOPLAM", + frequency="monthly", + start_date=default_start_date_fnc(), + end_date=default_end_date_fnc(), + aggregation=("avg",), + cache=False, + debug=False, + api_key=get_api_key()) + print(df) + assert isinstance(df, pd.DataFrame) + + +if __name__ == "__main__": + test1() + test2() \ No newline at end of file