Skip to content

Commit f590926

Browse files
committed
Added 2 more test cases for extract_dates func
1 parent e7cabf1 commit f590926

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/server/test_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,12 @@ def test_extract_dates(self):
477477
with self.subTest("multiple param mixed iso"):
478478
with app.test_request_context("/?s=2020-01-01&s=2020-01-02,2020-01-03"):
479479
self.assertEqual(extract_dates("s"), [20200101, 20200102, 20200103])
480+
with self.subTest("iso range"):
481+
with app.test_request_context("/?s=2020-01-01--2020-01-30"):
482+
self.assertEqual(extract_dates("s"), [(20200101, 20200130)])
483+
with self.subTest("wildcard"):
484+
with app.test_request_context("/?s=*"):
485+
self.assertEqual(extract_dates("s"), ["*"])
480486

481487
with self.subTest("not a date"):
482488
with app.test_request_context("/?s=a"):

0 commit comments

Comments
 (0)