'Creates a course grade and asserts that the associated logging
matches the expected totals passed in to the function.'

def _create_course_grade_and_check_logging(self, factory_method, log_mock, log_statement):

    factory_method(self.request.user, self.course)
    self.assertIn(log_statement, log_mock.call_args[0][0])
    self.assertIn(unicode(self.course.id), log_mock.call_args[0][1])
    self.assertEquals(self.request.user.id, log_mock.call_args[0][2])
