@@ -986,6 +986,7 @@ def test_bigquery_magic_dryrun_option_sets_job_config(monkeypatch):
986986 google .auth .credentials .Credentials , instance = True
987987 )
988988
989+ magics .context .project = "project-from-context"
989990 run_query_patch = mock .patch (
990991 "google.cloud.bigquery.magics.magics._run_query" , autospec = True
991992 )
@@ -1007,6 +1008,7 @@ def test_bigquery_magic_dryrun_option_returns_query_job(monkeypatch):
10071008 magics .context .credentials = mock .create_autospec (
10081009 google .auth .credentials .Credentials , instance = True
10091010 )
1011+ magics .context .project = "project-from-context"
10101012 query_job_mock = mock .create_autospec (
10111013 google .cloud .bigquery .job .QueryJob , instance = True
10121014 )
@@ -1035,6 +1037,7 @@ def test_bigquery_magic_dryrun_option_variable_error_message(
10351037 google .auth .credentials .Credentials , instance = True
10361038 )
10371039
1040+ magics .context .project = "project-from-context"
10381041 ipython_ns_cleanup .append ((ip , "q_job" ))
10391042
10401043 run_query_patch = mock .patch (
@@ -1064,6 +1067,7 @@ def test_bigquery_magic_dryrun_option_saves_query_job_to_variable(
10641067 magics .context .credentials = mock .create_autospec (
10651068 google .auth .credentials .Credentials , instance = True
10661069 )
1070+ magics .context .project = "project-from-context"
10671071 query_job_mock = mock .create_autospec (
10681072 google .cloud .bigquery .job .QueryJob , instance = True
10691073 )
@@ -1098,6 +1102,7 @@ def test_bigquery_magic_saves_query_job_to_variable_on_error(
10981102 google .auth .credentials .Credentials , instance = True
10991103 )
11001104
1105+ magics .context .project = "project-from-context"
11011106 ipython_ns_cleanup .append ((ip , "result" ))
11021107
11031108 client_query_patch = mock .patch (
0 commit comments