Skip to content

Commit 650c0cf

Browse files
committed
add query params to mock
1 parent e562d97 commit 650c0cf

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

stac_fastapi/elasticsearch/tests/clients/test_elasticsearch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ async def test_feature_collection_insert(
212212
assert len(fc["features"]) >= 10
213213

214214

215+
@pytest.mark.asyncio
215216
async def test_landing_page_no_collection_title(ctx, core_client, txn_client, app):
216217
ctx.collection["id"] = "new_id"
217218
del ctx.collection["title"]

stac_fastapi/elasticsearch/tests/conftest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,16 @@ class MockRequest:
4141
base_url = "http://test-server"
4242

4343
def __init__(
44-
self, method: str = "GET", url: str = "XXXX", app: Optional[Any] = None
44+
self,
45+
method: str = "GET",
46+
url: str = "XXXX",
47+
app: Optional[Any] = None,
48+
query_params: dict[str, Any] = {"limit": "10"},
4549
):
4650
self.method = method
4751
self.url = url
4852
self.app = app
53+
self.query_params = query_params or {}
4954

5055

5156
class TestSettings(AsyncElasticsearchSettings):

0 commit comments

Comments
 (0)