Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
abeglova committed Jan 7, 2025
1 parent 104a217 commit 67b6a59
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions learning_resources/etl/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,15 @@ def test_documents_from_olx():
assert len(parsed_documents) == 92

formula2do = next(
doc for doc in parsed_documents if doc[1]["key"].endswith("formula2do.xml")
doc
for doc in parsed_documents
if doc[1]["source_path"].endswith("formula2do.xml")
)
assert formula2do[0] == b'<html filename="formula2do" display_name="To do list"/>\n'
assert formula2do[1]["key"].endswith("formula2do.xml")
assert formula2do[1]["source_path"].endswith("formula2do.xml")
assert formula2do[1]["content_type"] == CONTENT_TYPE_FILE
assert formula2do[1]["mime_type"].endswith("/xml")
assert formula2do[1]["key"] == "8852bcb31c0a4dc9d6c5385e09b0e0c4"


@pytest.mark.parametrize(
Expand Down

0 comments on commit 67b6a59

Please sign in to comment.