mirror of
https://github.com/guezoloic/millesima_projetS6.git
synced 2026-03-31 12:21:34 +00:00
ajout(main.py): ajout test
This commit is contained in:
3
main.py
3
main.py
@@ -4,6 +4,9 @@ import requests as rq
|
|||||||
def getsoup(s: str) -> BeautifulSoup:
|
def getsoup(s: str) -> BeautifulSoup:
|
||||||
return BeautifulSoup(rq.get(s).text, 'html.parser')
|
return BeautifulSoup(rq.get(s).text, 'html.parser')
|
||||||
|
|
||||||
|
def test_soup():
|
||||||
|
assert getsoup("https://example.com").find('h1').text == "Example Domain"
|
||||||
|
|
||||||
soup = getsoup("https://www.millesima.fr/")
|
soup = getsoup("https://www.millesima.fr/")
|
||||||
|
|
||||||
def nimportequoi() :
|
def nimportequoi() :
|
||||||
|
|||||||
Reference in New Issue
Block a user