test load_recipe
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
719b544007
commit
b6daacca2d
|
|
@ -10,7 +10,6 @@ import logging
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
def parse_ingredient(ingredient_text):
|
def parse_ingredient(ingredient_text):
|
||||||
|
|
||||||
units = ['teaspoon', 'tablespoon', 'gram', 'ounce', 'jar', 'cup', 'pinch',
|
units = ['teaspoon', 'tablespoon', 'gram', 'ounce', 'jar', 'cup', 'pinch',
|
||||||
'container', 'slice', 'package', 'pound', 'can', 'dash', 'spear',
|
'container', 'slice', 'package', 'pound', 'can', 'dash', 'spear',
|
||||||
'bunch', 'quart', 'cube', 'envelope', 'square', 'sprig', 'bag',
|
'bunch', 'quart', 'cube', 'envelope', 'square', 'sprig', 'bag',
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,12 @@
|
||||||
from recipe_graph import scrape
|
from recipe_graph import scrape
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
def test_load_recipe():
|
||||||
|
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
|
||||||
Loading…
Reference in New Issue