From 35cbd872d9ef21d18b34718813a7c7b2c6d0203e Mon Sep 17 00:00:00 2001 From: Adrien Perrin Date: Tue, 8 Oct 2024 07:29:17 +0000 Subject: [PATCH] add missing test for erddap crawler --- tests/test_generic_crawlers.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_generic_crawlers.py b/tests/test_generic_crawlers.py index b42b1e1..137b680 100644 --- a/tests/test_generic_crawlers.py +++ b/tests/test_generic_crawlers.py @@ -1402,6 +1402,17 @@ def test_get_ids_error(self): self.assertRaises(requests.HTTPError): list(crawler.get_ids()) + def test__make_condition_parameters(self): + """Check that string parameters get quotes""" + self.assertDictEqual( + crawlers.ERDDAPTableCrawler('url.json', ['id_attr'])._make_condition_parameters({ + 'a': 'foo', + 'b': 1, + 'c': True + }), + {'a': '"foo"', 'b': 1, 'c': True} + ) + def test_crawl(self): """Test the DatasetInfo objects returned by the crawler""" ids = [["3901480"], ["5905121"], ["5905267"]]