Skip to content

Commit bf18633

Browse files
committed
test: use pytest_asyncio fixtures
1 parent 55e7e9a commit bf18633

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

tests/conftest.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
"""Test fixtures."""
22

3-
import pytest
3+
import pytest_asyncio
44

55
from 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")
1010
def db():
1111
"""Database URI."""
1212
return DbConfig().get_connection_string()
1313

1414

15-
@pytest.fixture
15+
@pytest_asyncio.fixture
1616
def polygon_geojson():
1717
"""Polygon."""
1818
return {
@@ -21,7 +21,7 @@ def polygon_geojson():
2121
}
2222

2323

24-
@pytest.fixture
24+
@pytest_asyncio.fixture
2525
def 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
5656
def 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
7575
def 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
111111
def 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
140140
def feature_geojson():
141141
"""Feature."""
142142
return {
@@ -149,7 +149,7 @@ def feature_geojson():
149149
}
150150

151151

152-
@pytest.fixture
152+
@pytest_asyncio.fixture
153153
def featcol_geojson():
154154
"""FeatureCollection."""
155155
return {
@@ -167,7 +167,7 @@ def featcol_geojson():
167167
}
168168

169169

170-
@pytest.fixture
170+
@pytest_asyncio.fixture
171171
def geomcol_geojson():
172172
"""GeometryCollection."""
173173
return {
@@ -181,7 +181,7 @@ def geomcol_geojson():
181181
}
182182

183183

184-
@pytest.fixture
184+
@pytest_asyncio.fixture
185185
def 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
198198
def 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
211211
def 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
260260
def featurecollection_mixed_geoms():
261261
"""FeatureCollection with different geom types."""
262262
return {

0 commit comments

Comments
 (0)