2022-10-15 14:40:42 -04:00
|
|
|
from recipe_graph import scrape
|
2023-05-17 22:01:19 -04:00
|
|
|
from bs4 import BeautifulSoup
|
2022-10-15 14:40:42 -04:00
|
|
|
|
2023-05-17 22:01:19 -04:00
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
|
|
2023-05-18 08:57:33 -04:00
|
|
|
def test_load_page():
|
2023-05-17 22:01:19 -04:00
|
|
|
page = scrape.load_recipe("https://hs.andreistoica.ca:4943")
|
|
|
|
|
assert type(page) == BeautifulSoup
|
|
|
|
|
|
|
|
|
|
page = scrape.load_recipe("https://hs.andreistoica.ca:4943/some-nonesense")
|
|
|
|
|
assert page == None
|