From ca829c16f45dfc825c3fac94cca0ed85b4613143 Mon Sep 17 00:00:00 2001 From: Andrew Walsh Date: Wed, 28 Mar 2018 11:13:36 +1100 Subject: [PATCH] add no_such_product definition for failure with ValueError --- integration_tests/index/test_search.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/integration_tests/index/test_search.py b/integration_tests/index/test_search.py index 282518471d..eb915f3eeb 100644 --- a/integration_tests/index/test_search.py +++ b/integration_tests/index/test_search.py @@ -1107,7 +1107,11 @@ def matches_1(*args): def matches_none(*args): rows = _cli_csv_search(('datasets',) + args, clirunner) - assert len(lines) == 1 + assert len(rows) == 0 + + def no_such_product(*args): + with pytest.raises(ValueError): + rows = _cli_csv_search(('datasets',) + args, clirunner) matches_both(' -40 < lat < -10') matches_both('product=' + pseudo_ls8_type.name) @@ -1119,7 +1123,7 @@ def matches_none(*args): matches_1('platform=LANDSAT_8', '2014-07-24