Skip to content

Commit

Permalink
Unit test added for markdown to html conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
anbeemer committed Jul 22, 2024
1 parent 0dd5ddd commit 5025f1d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,17 @@ def test_already_online_raises(self, course, page_has_local_images):
def test_doesnt_find_deleted(self, course, page_has_local_images):
name = page_has_local_images.name
page_has_local_images.publish(course,overwrite=True)
f = mc.find_page_in_course(name,course)
f = mc.course_interaction_functions.find_page_in_course(name,course)
f.delete()
assert not mc.is_page_already_uploaded(name,course)
assert not mc.course_interaction_functions.is_page_already_uploaded(name,course)

def test_can_find_published(self, course, page_has_local_images):
page_has_local_images.publish(course,overwrite=True)
assert mc.is_page_already_uploaded(page_has_local_images.name,course)
assert mc.course_interaction_functions.is_page_already_uploaded(page_has_local_images.name,course)

def test_content(self, course):
content = course.get_pages(search_term='Test Has Local Images')[0].show_latest_revision().body
assert 'testing source including images' in content
assert 'alt="A menagerie of Herwig Hauser surfaces"' in content
assert ('## an image using html' not in content) and "The markdown header was not translated to html."

0 comments on commit 5025f1d

Please sign in to comment.