def test_statement_notpassed(self):
     """
     Validate statement when learner completes a course.
     """
     statement = LearnerCourseCompletionStatement(
         self.site, self.user, self.mock_social_auth, self.course_overview,
         self.course_grade_notpassed, 'course')
     self.assertDictEqual(json.loads(statement.to_json()),
                          self.expected_notpassed)
 def test_statement(self):
     """
     Validate statement when learner completes a course.
     """
     statement = LearnerCourseCompletionStatement(
         self.user,
         self.course_overview,
         self.user_details,
         self.course_details,
         self.course_grade,
     )
     assert json.loads(statement.to_json()) == self.expected
 def test_statement_courserun(self):
     """
     Validate statement when learner completes a course.
     """
     statement = LearnerCourseCompletionStatement(
         self.site,
         self.user,
         self.mock_social_auth,
         self.course_overview,
         self.course_grade,
         ContentType.COURSE_RUN,
     )
     self.assertDictEqual(json.loads(statement.to_json()),
                          self.expected_courserun)