@@ -38,6 +38,7 @@ def test_geoalchemy2_core(engine, bigquery_dataset):
3838
3939 from sqlalchemy_bigquery import GEOGRAPHY , WKT
4040
41+ metadata = MetaData ()
4142 lake_table = Table (
4243 "lake" , metadata , Column ("name" , String ), Column ("geog" , GEOGRAPHY )
4344 )
@@ -128,12 +129,16 @@ def test_geoalchemy2_core(engine, bigquery_dataset):
128129 )
129130
130131
131- def test_geoalchemy2_orm (engine , bigquery_dataset ):
132+ def test_geoalchemy2_orm (bigquery_dataset ):
132133 """Make sure GeoAlchemy 2 ORM Tutorial works as adapted to only having geometry
133134
134135 https://geoalchemy-2.readthedocs.io/en/latest/orm_tutorial.html
135136 """
136137
138+ from sqlalchemy import create_engine
139+
140+ engine = create_engine (f"bigquery:///{ bigquery_dataset } " )
141+
137142 # Declare a Mapping
138143
139144 from sqlalchemy import Column , Integer , String
@@ -237,7 +242,10 @@ class Lake(Base):
237242 ]
238243
239244
240- def test_geoalchemy2_orm_w_relationship (engine , bigquery_dataset ):
245+ def test_geoalchemy2_orm_w_relationship (bigquery_dataset ):
246+ from sqlalchemy import create_engine
247+
248+ engine = create_engine (f"bigquery:///{ bigquery_dataset } " )
241249
242250 from sqlalchemy import Column , Integer , String
243251 from sqlalchemy .ext .declarative import declarative_base
0 commit comments