Exemplo n.º 1
0
async def test_parse_recipes_returns_articles(bot):
    mock_data = get_mock_data("test1", 5)
    expected_response = [get_mock_data("test1", 5) for _ in range(5)]
    html = json_articles(mock_data)
    clazz = Recipe(bot)
    response = clazz.parse_recipes(html)
    assert response == expected_response
Exemplo n.º 2
0
async def test_parse_recipes_no_content_returns_empty(bot):
    expected_response = []
    html = without_content()
    clazz = Recipe(bot)
    response = clazz.parse_recipes(html)
    assert response == expected_response