11"""Test fixtures."""
22
3- import pytest
3+ import pytest_asyncio
44
55from geojson_aoi .dbconfig import DbConfig
66
77
88# TODO: Unable to get dummy session to work in pytest, or luke session to work in docker
9- @pytest .fixture (scope = "session" )
9+ @pytest_asyncio .fixture (scope = "session" )
1010def db ():
1111 """Database URI."""
1212 return DbConfig ().get_connection_string ()
1313
1414
15- @pytest .fixture
15+ @pytest_asyncio .fixture
1616def polygon_geojson ():
1717 """Polygon."""
1818 return {
@@ -21,7 +21,7 @@ def polygon_geojson():
2121 }
2222
2323
24- @pytest .fixture
24+ @pytest_asyncio .fixture
2525def polygon_holes_geojson ():
2626 """Polygon with holes."""
2727 return {
@@ -52,7 +52,7 @@ def polygon_holes_geojson():
5252 }
5353
5454
55- @pytest .fixture
55+ @pytest_asyncio .fixture
5656def multipolygon_geojson ():
5757 """MultiPolygon, three separate polygons."""
5858 return {
@@ -71,7 +71,7 @@ def multipolygon_geojson():
7171 }
7272
7373
74- @pytest .fixture
74+ @pytest_asyncio .fixture
7575def multipolygon_holes_geojson ():
7676 """MultiPolygon with holes.
7777
@@ -107,7 +107,7 @@ def multipolygon_holes_geojson():
107107 }
108108
109109
110- @pytest .fixture
110+ @pytest_asyncio .fixture
111111def polygon_overlaps_geojson ():
112112 """Polygon with overlapping polygons."""
113113 return {
@@ -136,7 +136,7 @@ def polygon_overlaps_geojson():
136136 }
137137
138138
139- @pytest .fixture
139+ @pytest_asyncio .fixture
140140def feature_geojson ():
141141 """Feature."""
142142 return {
@@ -149,7 +149,7 @@ def feature_geojson():
149149 }
150150
151151
152- @pytest .fixture
152+ @pytest_asyncio .fixture
153153def featcol_geojson ():
154154 """FeatureCollection."""
155155 return {
@@ -167,7 +167,7 @@ def featcol_geojson():
167167 }
168168
169169
170- @pytest .fixture
170+ @pytest_asyncio .fixture
171171def geomcol_geojson ():
172172 """GeometryCollection."""
173173 return {
@@ -181,7 +181,7 @@ def geomcol_geojson():
181181 }
182182
183183
184- @pytest .fixture
184+ @pytest_asyncio .fixture
185185def feature_with_property_geojson ():
186186 """Feature with a single property."""
187187 return {
@@ -194,7 +194,7 @@ def feature_with_property_geojson():
194194 }
195195
196196
197- @pytest .fixture
197+ @pytest_asyncio .fixture
198198def feature_with_properties_geojson ():
199199 """Feature with multiple properties."""
200200 return {
@@ -207,7 +207,7 @@ def feature_with_properties_geojson():
207207 }
208208
209209
210- @pytest .fixture
210+ @pytest_asyncio .fixture
211211def geometrycollection_mixed_geoms ():
212212 """GeometryCollection that contains all kinds of geoms."""
213213 return {
@@ -256,7 +256,7 @@ def geometrycollection_mixed_geoms():
256256 }
257257
258258
259- @pytest .fixture
259+ @pytest_asyncio .fixture
260260def featurecollection_mixed_geoms ():
261261 """FeatureCollection with different geom types."""
262262 return {
0 commit comments