Skip to content

Commit 41186cb

Browse files
author
mongkok
committed
Added test request params
1 parent b659239 commit 41186cb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/panels/test_logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async def get_log_async(request: Request, level: str) -> str:
2828
@pytest.mark.parametrize("path", [pytest.param("sync", marks=skip_py(3, 8)), "async"])
2929
@override_panels(["debug_toolbar.panels.logging.LoggingPanel"])
3030
def test_logging(client: TestClient, path: str, level: str) -> None:
31-
store_id = client.get_store_id(f"/log/{path}?level={level}")
31+
store_id = client.get_store_id(f"/log/{path}", params={"level": level})
3232
stats = client.get_stats(store_id, "LoggingPanel")
3333

3434
assert stats["records"][0]["level"] == level

tests/testclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def get_store_id(self, path: str, method: str = None, **kwargs: t.Any) -> str:
2222

2323
def render_panel(self, store_id: str, panel_id: str) -> requests.Response:
2424
url = self.app.url_path_for("debug_toolbar.render_panel") # type: ignore
25-
return self.get(f"{url}?store_id={store_id}&panel_id={panel_id}")
25+
return self.get(url, params={"store_id": store_id, "panel_id": panel_id})
2626

2727
def get_stats(self, store_id: str, panel_id: str) -> Stats:
2828
response = self.render_panel(store_id, panel_id)

0 commit comments

Comments
 (0)