From 7f5786b398c76eed96148c0e42575ece741bf4c7 Mon Sep 17 00:00:00 2001
From: lb584 <lb584@cam.ac.uk>
Date: Wed, 1 Feb 2023 18:27:20 +0000
Subject: [PATCH] adding custom date params to pipeline

---
 tests/integration/full/full_test_deposition.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/integration/full/full_test_deposition.py b/tests/integration/full/full_test_deposition.py
index 8f06e5a..1291706 100644
--- a/tests/integration/full/full_test_deposition.py
+++ b/tests/integration/full/full_test_deposition.py
@@ -1,5 +1,6 @@
 import argparse
 import copy
+import glob
 import os
 import sys
 import unittest
@@ -55,13 +56,13 @@ class TestFullDeposition(unittest.TestCase):
 
         east_africa_image_path = os.path.join(TestFullDeposition.TEST_OUT_PATH, TestFullDeposition.TEST_JOB_DIR,
                                               "plotting", "eastafrica", "images", "Weekly",
-                                              "deposition_eastafrica_leaf_rust_total_202301260000_202302020000_map.png")
+                                              "deposition_eastafrica_leaf_rust_total_*_map.png")
         ethiopia_image_path = os.path.join(TestFullDeposition.TEST_OUT_PATH, TestFullDeposition.TEST_JOB_DIR,
                                            "plotting", "ethiopia", "images", "Weekly",
-                                           "deposition_ethiopia_leaf_rust_total_202301260000_202302020000_map.png")
+                                           "deposition_ethiopia_leaf_rust_total_*_map.png")
 
-        ea_file_exists: bool = os.path.isfile(east_africa_image_path)
-        eth_file_exists: bool = os.path.isfile(ethiopia_image_path)
+        ea_file_exists: bool = len(glob.glob(east_africa_image_path)) > 1
+        eth_file_exists: bool = len(glob.glob(ethiopia_image_path)) > 1
         self.assertTrue(ea_file_exists)
         self.assertTrue(eth_file_exists)
 
-- 
GitLab