Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions contentcuration/contentcuration/tests/test_storage_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ def test_determine_function_returns_pdf_for_pdfs(self):
"""
assert determine_content_type("me.pdf") == "application/pdf"

def test_determine_function_returns_zip_for_zips(self):
"""
Check that determine_content_type returns an application/zip
for .pdf suffixed strings.
"""
assert determine_content_type("me.zip") == "application/zip"

def test_determine_function_returns_epub_for_epubs(self):
"""
Check that determine_content_type returns an application/epub+zip
for .pdf suffixed strings.
"""
assert determine_content_type("me.epub") == "application/epub+zip"

def test_determine_function_returns_octet_stream_for_unknown_formats(self):
"""
Check that we return application/octet-stream when we give a filename
Expand Down
Loading