From d9e21c1c234d74de4ab8e7eaf5b5b3d5ae625a84 Mon Sep 17 00:00:00 2001
From: lukas leufen <l.leufen@fz-juelich.de>
Date: Fri, 6 Dec 2019 11:59:27 +0100
Subject: [PATCH] minor fix

---
 src/data_preparation.py                  |  2 +-
 test/test_modules/test_pre_processing.py | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/data_preparation.py b/src/data_preparation.py
index 3c50ba89..badd75aa 100644
--- a/src/data_preparation.py
+++ b/src/data_preparation.py
@@ -116,7 +116,7 @@ class DataPrep(object):
         :return:
         """
         df_all = {}
-        df, meta = join.download_join(station_name=self.station, statvar=self.statistics_per_var,
+        df, meta = join.download_join(station_name=self.station, stat_var=self.statistics_per_var,
                                       station_type=self.station_type, network_name=self.network)
         df_all[self.station[0]] = df
         # convert df_all to xarray
diff --git a/test/test_modules/test_pre_processing.py b/test/test_modules/test_pre_processing.py
index 13abe62a..41e8729d 100644
--- a/test/test_modules/test_pre_processing.py
+++ b/test/test_modules/test_pre_processing.py
@@ -42,11 +42,11 @@ class TestPreProcessing:
         ExperimentSetup(parser_args={}, stations=['DEBW107', 'DEBY081', 'DEBW013', 'DEBW076', 'DEBW087'],
                         var_all_dict={'o3': 'dma8eu', 'temp': 'maximum'})
         caplog.set_level(logging.INFO)
-        PreProcessing()
-        assert caplog.record_tuples[0] == ('root', 20, 'PreProcessing started')
-        assert caplog.record_tuples[1] == ('root', 20, 'check valid stations started')
-        assert caplog.record_tuples[-1] == ('root', 20, PyTestRegex(r'run for \d+\.\d+s to check 5 station\(s\). Found '
-                                                                    r'5/5 valid stations.'))
+        with PreProcessing():
+            assert caplog.record_tuples[0] == ('root', 20, 'PreProcessing started')
+            assert caplog.record_tuples[1] == ('root', 20, 'check valid stations started')
+            assert caplog.record_tuples[-1] == ('root', 20, PyTestRegex(r'run for \d+\.\d+s to check 5 station\(s\). '
+                                                                        r'Found 5/5 valid stations.'))
         RunEnvironment().__del__()
 
     def test_run(self, obj_with_exp_setup):
-- 
GitLab