@@ -659,7 +659,7 @@ def test_GetCompletionStatus(test_client, test_user_1, runestone_db_tools):
659659
660660 # Check an unviewed page
661661 kwargs = dict (
662- lastPageUrl = 'https://runestone.academy/runestone/static/ test_course_1/test_chapter_1/toctree .html'
662+ lastPageUrl = 'https://runestone.academy/runestone/books/published/ test_course_1/test_chapter_1/subchapter_a .html'
663663 )
664664
665665 test_client .validate ('ajax/getCompletionStatus' , data = kwargs )
@@ -669,7 +669,7 @@ def test_GetCompletionStatus(test_client, test_user_1, runestone_db_tools):
669669
670670 # check that the unviewed page gets added into the database with a start_date of today
671671 db = runestone_db_tools .db
672- row = db ((db .user_sub_chapter_progress .chapter_id == 'test_chapter_1' ) & (db .user_sub_chapter_progress .sub_chapter_id == 'toctree ' )).select ().first ()
672+ row = db ((db .user_sub_chapter_progress .chapter_id == 'test_chapter_1' ) & (db .user_sub_chapter_progress .sub_chapter_id == 'subchapter_a ' )).select ().first ()
673673 print (row )
674674 assert row is not None
675675 assert row .end_date is None
@@ -681,7 +681,7 @@ def test_GetCompletionStatus(test_client, test_user_1, runestone_db_tools):
681681 # Check a viewed page w/ completion status 0
682682 # 'View the page'
683683 kwargs = dict (
684- lastPageUrl = 'https://runestone.academy/runestone/static /test_course_1/test_chapter_1/subchapter_a.html' ,
684+ lastPageUrl = 'https://runestone.academy/runestone/books/published /test_course_1/test_chapter_1/subchapter_a.html' ,
685685 lastPageScrollLocation = 0 ,
686686 course = test_user_1 .course .course_name ,
687687 completionFlag = 0
@@ -715,13 +715,20 @@ def test_GetCompletionStatus(test_client, test_user_1, runestone_db_tools):
715715 test_client .validate ('ajax/getAllCompletionStatus' )
716716 res = json .loads (test_client .text )
717717 print (res )
718- assert len (res ) == 3
718+ assert len (res ) == 1
719719
720720
721721def test_updatelastpage (test_client , test_user_1 , runestone_db_tools ):
722+ # Check an unviewed page
723+ kwargs = dict (
724+ lastPageUrl = 'https://runestone.academy/runestone/books/published/test_course_1/test_chapter_1/subchapter_a.html'
725+ )
726+
727+ test_client .validate ('ajax/getCompletionStatus' , data = kwargs )
728+
722729 test_user_1 .login ()
723730 kwargs = dict (
724- lastPageUrl = 'https://runestone.academy/runestone/static /test_course_1/test_chapter_1/subchapter_a.html' ,
731+ lastPageUrl = 'https://runestone.academy/runestone/books/published /test_course_1/test_chapter_1/subchapter_a.html' ,
725732 lastPageScrollLocation = 0 ,
726733 course = test_user_1 .course .course_name ,
727734 completionFlag = 1
0 commit comments