diff --git a/covid_act_now/tests/test_run.py b/covid_act_now/tests/test_run.py index 7cec2e1dc3..e3fb9a1c13 100644 --- a/covid_act_now/tests/test_run.py +++ b/covid_act_now/tests/test_run.py @@ -21,6 +21,7 @@ def test_output_files(self, clean_receiving_dir): run_module(self.PARAMS) csv_files = set(listdir("receiving")) csv_files.discard(".gitignore") + today = pd.Timestamp.today().date().strftime("%Y%m%d") expected_files = set() for signal in SIGNALS: @@ -30,7 +31,11 @@ def test_output_files(self, clean_receiving_dir): # All output files exist assert csv_files == expected_files + expected_columns = [ + "geo_id", "val", "se", "sample_size", + "missing_val", "missing_se", "missing_sample_size" + ] # All output files have correct columns for csv_file in csv_files: df = pd.read_csv(join("receiving", csv_file)) - assert (df.columns.values == ["geo_id", "val", "se", "sample_size"]).all() + assert (df.columns.values == expected_columns).all()