Skip to content

Commit

Permalink
Added unit test to test_page.py
Browse files Browse the repository at this point in the history
  • Loading branch information
anbeemer committed Jul 17, 2024
1 parent facc582 commit 357dbd6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/test_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ 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)
assert mc.is_page_already_uploaded(name,course)
f = mc.find_page_in_course(name,course)
f.delete()
assert not mc.is_page_already_uploaded(name,course)
Expand All @@ -54,3 +52,8 @@ 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)

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

0 comments on commit 357dbd6

Please sign in to comment.