@@ -1338,16 +1338,14 @@ def test_cross_match(background, cross_match_kwargs, mock_querier_async):
1338
1338
"kwarg,invalid_value,error_message" ,
1339
1339
[("full_qualified_table_name_a" ,
1340
1340
"tableA" ,
1341
- "^Not found schema name in full qualified table A : 'tableA'$" ),
1341
+ "^Not found schema name in full qualified table: 'tableA'$" ),
1342
1342
("full_qualified_table_name_b" ,
1343
1343
"tableB" ,
1344
- "^Not found schema name in full qualified table B : 'tableB'$" ),
1344
+ "^Not found schema name in full qualified table: 'tableB'$" ),
1345
1345
("results_table_name" ,
1346
1346
"schema.results" ,
1347
1347
"^Please, do not specify schema for 'results_table_name'$" )])
1348
- def test_cross_match_invalid_mandatory_kwarg (
1349
- cross_match_kwargs , kwarg , invalid_value , error_message
1350
- ):
1348
+ def test_cross_match_invalid_mandatory_kwarg (cross_match_kwargs , kwarg , invalid_value , error_message ):
1351
1349
cross_match_kwargs [kwarg ] = invalid_value
1352
1350
with pytest .raises (ValueError , match = error_message ):
1353
1351
GAIA_QUERIER .cross_match (** cross_match_kwargs )
@@ -1411,7 +1409,11 @@ def load_table_monkeypatched(self, table, verbose):
1411
1409
return_val = {"user_hola.tableA" : tap_table_a , "user_hola.tableB" : tap_table_b }
1412
1410
return return_val [table ]
1413
1411
1412
+ def update_user_table (self , table_name , list_of_changes , verbose ):
1413
+ return None
1414
+
1414
1415
monkeypatch .setattr (Tap , "load_table" , load_table_monkeypatched )
1416
+ monkeypatch .setattr (TapPlus , "update_user_table" , update_user_table )
1415
1417
1416
1418
job = mock_querier_async .cross_match_stream (** cross_match_stream_2_kwargs , background = background )
1417
1419
assert job .async_ is True
@@ -1421,14 +1423,20 @@ def load_table_monkeypatched(self, table, verbose):
1421
1423
1422
1424
@pytest .mark .parametrize ("background" , [False , True ])
1423
1425
def test_cross_match_stream_3 (monkeypatch , background , mock_querier_async ):
1424
- def load_table_monkeypatched (self , table , verbose ):
1426
+ mock_querier_async .MAIN_GAIA_TABLE = None
1427
+
1428
+ def load_table_monkeypatched_2 (self , table , verbose ):
1425
1429
tap_table_a = make_table_metadata ("user_hola.tableA" )
1426
1430
tap_table_b = make_table_metadata ("gaiadr3.gaia_source" )
1427
1431
1428
1432
return_val = {"user_hola.tableA" : tap_table_a , "gaiadr3.gaia_source" : tap_table_b }
1429
1433
return return_val [table ]
1430
1434
1431
- monkeypatch .setattr (Tap , "load_table" , load_table_monkeypatched )
1435
+ def update_user_table (self , table_name , list_of_changes , verbose ):
1436
+ return None
1437
+
1438
+ monkeypatch .setattr (Tap , "load_table" , load_table_monkeypatched_2 )
1439
+ monkeypatch .setattr (TapPlus , "update_user_table" , update_user_table )
1432
1440
1433
1441
job = mock_querier_async .cross_match_stream (table_a_full_qualified_name = "user_hola.tableA" , table_a_column_ra = "ra" ,
1434
1442
table_a_column_dec = "dec" , background = background )
0 commit comments