mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-03 04:25:24 +02: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:
parent
6e15a8c439
commit
1379529df5
4 changed files with 110 additions and 5 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue