mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-31 06:39:31 +00:00
response.content.decode() => response.text
This commit is contained in:
1 parent
ad4afce67f
commit
805ffc498f
6 files changed
+33
-33
No files matched your search
@@ -20,7 +20,7 @@ def test_page_display_on_club_main_page(client: Client):
|
||||
res = client.get(reverse("club:club_view", kwargs={"club_id": club.id}))
|
||||
|
||||
assert res.status_code == 200
|
||||
soup = BeautifulSoup(res.content.decode(), "lxml")
|
||||
soup = BeautifulSoup(res.text, "lxml")
|
||||
detail_html = soup.find(id="club_detail").find(class_="markdown")
|
||||
assertHTMLEqual(detail_html.decode_contents(), markdown(content))
|
||||
|
||||
@@ -34,6 +34,6 @@ def test_club_main_page_without_content(client: Client):
|
||||
res = client.get(reverse("club:club_view", kwargs={"club_id": club.id}))
|
||||
|
||||
assert res.status_code == 200
|
||||
soup = BeautifulSoup(res.content.decode(), "lxml")
|
||||
soup = BeautifulSoup(res.text, "lxml")
|
||||
detail_html = soup.find(id="club_detail")
|
||||
assert detail_html.find_all("markdown") == []
|
||||
Reference in new issue
Block a user