From 0c29716afda2606518e778861c1bd16824d4019b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 25 Feb 2021 00:53:17 +0000 Subject: [PATCH] tests: use new parse Signed-off-by: Ian Jackson --- apitest/at-otter.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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); -- 2.30.2