@@ -1338,16 +1338,14 @@ def test_cross_match(background, cross_match_kwargs, mock_querier_async):
13381338 "kwarg,invalid_value,error_message" ,
13391339 [("full_qualified_table_name_a" ,
13401340 "tableA" ,
1341- "^Not found schema name in full qualified table A : 'tableA'$" ),
1341+ "^Not found schema name in full qualified table: 'tableA'$" ),
13421342 ("full_qualified_table_name_b" ,
13431343 "tableB" ,
1344- "^Not found schema name in full qualified table B : 'tableB'$" ),
1344+ "^Not found schema name in full qualified table: 'tableB'$" ),
13451345 ("results_table_name" ,
13461346 "schema.results" ,
13471347 "^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 ):
13511349 cross_match_kwargs [kwarg ] = invalid_value
13521350 with pytest .raises (ValueError , match = error_message ):
13531351 GAIA_QUERIER .cross_match (** cross_match_kwargs )
@@ -1411,7 +1409,11 @@ def load_table_monkeypatched(self, table, verbose):
14111409 return_val = {"user_hola.tableA" : tap_table_a , "user_hola.tableB" : tap_table_b }
14121410 return return_val [table ]
14131411
1412+ def update_user_table (self , table_name , list_of_changes , verbose ):
1413+ return None
1414+
14141415 monkeypatch .setattr (Tap , "load_table" , load_table_monkeypatched )
1416+ monkeypatch .setattr (TapPlus , "update_user_table" , update_user_table )
14151417
14161418 job = mock_querier_async .cross_match_stream (** cross_match_stream_2_kwargs , background = background )
14171419 assert job .async_ is True
@@ -1421,14 +1423,20 @@ def load_table_monkeypatched(self, table, verbose):
14211423
14221424@pytest .mark .parametrize ("background" , [False , True ])
14231425def 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 ):
14251429 tap_table_a = make_table_metadata ("user_hola.tableA" )
14261430 tap_table_b = make_table_metadata ("gaiadr3.gaia_source" )
14271431
14281432 return_val = {"user_hola.tableA" : tap_table_a , "gaiadr3.gaia_source" : tap_table_b }
14291433 return return_val [table ]
14301434
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 )
14321440
14331441 job = mock_querier_async .cross_match_stream (table_a_full_qualified_name = "user_hola.tableA" , table_a_column_ra = "ra" ,
14341442 table_a_column_dec = "dec" , background = background )
0 commit comments