mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-27 08:14:30 -04:00
* parses datetime properly + clean category - #248 * add default credentials to docs Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import json
|
||||
import re
|
||||
from datetime import timedelta
|
||||
|
||||
import pytest
|
||||
from mealie.services.scraper.cleaner import Cleaner
|
||||
@@ -89,3 +90,11 @@ def test_html_with_recipe_data():
|
||||
assert url_validation_regex.match(recipe_data["image"])
|
||||
assert len(recipe_data["recipeIngredient"]) == 13
|
||||
assert len(recipe_data["recipeInstructions"]) == 4
|
||||
|
||||
|
||||
def test_time_cleaner():
|
||||
|
||||
my_time_delta = "PT2H30M"
|
||||
return_delta = Cleaner.time(my_time_delta)
|
||||
|
||||
assert return_delta == "2 Hours 30 Minutes"
|
||||
|
||||
Reference in New Issue
Block a user