@@ -374,10 +374,6 @@ def test_missions_filter_products(patch_post):
374
374
filtered = mast .MastMissions .filter_products (products , extension = 'fits' )
375
375
assert len (filtered ) > 0
376
376
377
- # Filter by non-existing column
378
- with pytest .warns (InputWarning ):
379
- mast .MastMissions .filter_products (products , invalid = True )
380
-
381
377
# Numeric filtering
382
378
# Single integer value
383
379
filtered = mast .MastMissions .filter_products (products , size = 11520 )
@@ -412,6 +408,10 @@ def test_missions_filter_products(patch_post):
412
408
# Invalid filter value
413
409
mast .MastMissions .filter_products (products , size = 'invalid' )
414
410
411
+ # Error when filtering by non-existing column
412
+ with pytest .raises (InvalidQueryError , match = "Column 'non_existing' not found in product table." ):
413
+ mast .MastMissions .filter_products (products , non_existing = 'value' )
414
+
415
415
416
416
def test_missions_download_products (patch_post , tmp_path ):
417
417
# Check string input
@@ -720,10 +720,6 @@ def test_observations_filter_products(patch_post):
720
720
filtered = mast .Observations .filter_products (products , extension = 'fits' )
721
721
assert len (filtered ) > 0
722
722
723
- # Filter by non-existing column
724
- with pytest .warns (InputWarning ):
725
- mast .Observations .filter_products (products , invalid = True )
726
-
727
723
# Numeric filtering
728
724
filtered = mast .Observations .filter_products (products , size = '<50000' )
729
725
assert all (filtered ['size' ] < 50000 )
@@ -732,6 +728,10 @@ def test_observations_filter_products(patch_post):
732
728
with pytest .raises (InvalidQueryError , match = "Could not parse numeric filter 'invalid' for column 'size'" ):
733
729
filtered = mast .Observations .filter_products (products , size = 'invalid' )
734
730
731
+ # Filter by non-existing column
732
+ with pytest .raises (InvalidQueryError , match = "Column 'invalid' not found in product table." ):
733
+ mast .Observations .filter_products (products , invalid = True )
734
+
735
735
736
736
def test_observations_download_products (patch_post , tmpdir ):
737
737
# actually download the products
0 commit comments