@@ -56,6 +56,10 @@ def setUp(self):
5656 course = self .course ,
5757 )
5858
59+ # Set the course's project passing score
60+ self .course .project_passing_score = 70
61+ self .course .save ()
62+
5963 self .project = Project .objects .create (
6064 course = self .course ,
6165 slug = "test-project" ,
@@ -67,7 +71,6 @@ def setUp(self):
6771 learning_in_public_cap_project = 5 ,
6872 learning_in_public_cap_review = 3 ,
6973 number_of_peers_to_evaluate = 3 ,
70- points_to_pass = 70 ,
7174 )
7275
7376 self .submission = ProjectSubmission .objects .create (
@@ -386,8 +389,8 @@ def test_project_passed(self):
386389 scores = [3 , 3 , 0 ]
387390 expected_project_score = 3
388391
389- self .project . points_to_pass = 3
390- self .project .save ()
392+ self .course . project_passing_score = 3
393+ self .course .save ()
391394
392395 answers_and_scores = list (zip (answers , scores ))
393396
@@ -425,8 +428,8 @@ def test_project_not_passed(self):
425428 scores = [3 , 0 , 0 ]
426429 expected_project_score = 0
427430
428- self .project . points_to_pass = 3
429- self .project .save ()
431+ self .course . project_passing_score = 3
432+ self .course .save ()
430433
431434 answers_and_scores = list (zip (answers , scores ))
432435
@@ -452,8 +455,8 @@ def test_project_not_passed(self):
452455 )
453456
454457 def test_not_scoring_when_passing_score_is_0 (self ):
455- self .project . points_to_pass = 0
456- self .project .save ()
458+ self .course . project_passing_score = 0
459+ self .course .save ()
457460
458461 status , _ = score_project (self .project )
459462 self .assertEqual (status , ProjectActionStatus .FAIL )
@@ -478,8 +481,8 @@ def test_project_passed_with_optional(self):
478481 scores = [3 , 3 , 0 ]
479482 expected_project_score = 3
480483
481- self .project . points_to_pass = 3
482- self .project .save ()
484+ self .course . project_passing_score = 3
485+ self .course .save ()
483486
484487 answers_and_scores = list (zip (answers , scores ))
485488
0 commit comments