From: Ian Jackson Date: Thu, 25 Feb 2021 00:53:17 +0000 (+0000) Subject: tests: use new parse X-Git-Tag: otter-0.4.0~362 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0c29716afda2606518e778861c1bd16824d4019b;p=otter.git tests: use new parse Signed-off-by: Ian Jackson --- diff --git a/apitest/at-otter.rs b/apitest/at-otter.rs index cf536c30..9bf37971 100644 --- a/apitest/at-otter.rs +++ b/apitest/at-otter.rs @@ -87,13 +87,9 @@ impl Ctx { let ptoken = loading.e_attr("#loading_token", "data-ptoken").unwrap(); dbg!(&ptoken); - let resp = client.post(&self.ds.subst("@url@/_/session/Portrait")?) + let session = client.post(&self.ds.subst("@url@/_/session/Portrait")?) .json(&json!({ "ptoken": ptoken })) - .send()?; - ensure_eq!(resp.status(), 200); - let body = resp.text()?; - let session = scraper::Html::parse_document(&body); - //dbg!(&body, &dom); + .send_parse_html()?; let ctoken = session.e_attr("#main-body", "data-ctoken").unwrap(); dbg!(&ctoken);