Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
a0da9b89
Commit
a0da9b89
authored
Jul 13, 2017
by
Alex Dusenbery
Committed by
Alex Dusenbery
Jul 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn down course_grade_factory.py logging.
parent
b63e5fa0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
lms/djangoapps/grades/new/course_grade_factory.py
+1
-1
lms/djangoapps/grades/tests/test_new.py
+8
-8
No files found.
lms/djangoapps/grades/new/course_grade_factory.py
View file @
a0da9b89
...
@@ -160,7 +160,7 @@ class CourseGradeFactory(object):
...
@@ -160,7 +160,7 @@ class CourseGradeFactory(object):
persistent_grade
.
passed_timestamp
is
not
None
,
persistent_grade
.
passed_timestamp
is
not
None
,
)
)
log
.
info
(
u'Grades: Read,
%
s, User:
%
s,
%
s'
,
unicode
(
course_data
),
user
.
id
,
persistent_grade
)
log
.
debug
(
u'Grades: Read,
%
s, User:
%
s,
%
s'
,
unicode
(
course_data
),
user
.
id
,
persistent_grade
)
return
course_grade
,
persistent_grade
.
grading_policy_hash
return
course_grade
,
persistent_grade
.
grading_policy_hash
...
...
lms/djangoapps/grades/tests/test_new.py
View file @
a0da9b89
...
@@ -683,9 +683,9 @@ class TestCourseGradeLogging(ProblemSubmissionTestMixin, SharedModuleStoreTestCa
...
@@ -683,9 +683,9 @@ class TestCourseGradeLogging(ProblemSubmissionTestMixin, SharedModuleStoreTestCa
matches the expected totals passed in to the function.
matches the expected totals passed in to the function.
"""
"""
factory_method
(
self
.
request
.
user
,
self
.
course
)
factory_method
(
self
.
request
.
user
,
self
.
course
)
self
.
assertIn
(
log_statement
,
log_mock
.
info
.
call_args
[
0
][
0
])
self
.
assertIn
(
log_statement
,
log_mock
.
call_args
[
0
][
0
])
self
.
assertIn
(
unicode
(
self
.
course
.
id
),
log_mock
.
info
.
call_args
[
0
][
1
])
self
.
assertIn
(
unicode
(
self
.
course
.
id
),
log_mock
.
call_args
[
0
][
1
])
self
.
assertEquals
(
self
.
request
.
user
.
id
,
log_mock
.
info
.
call_args
[
0
][
2
])
self
.
assertEquals
(
self
.
request
.
user
.
id
,
log_mock
.
call_args
[
0
][
2
])
def
test_course_grade_logging
(
self
):
def
test_course_grade_logging
(
self
):
grade_factory
=
CourseGradeFactory
()
grade_factory
=
CourseGradeFactory
()
...
@@ -698,16 +698,16 @@ class TestCourseGradeLogging(ProblemSubmissionTestMixin, SharedModuleStoreTestCa
...
@@ -698,16 +698,16 @@ class TestCourseGradeLogging(ProblemSubmissionTestMixin, SharedModuleStoreTestCa
with
patch
(
'lms.djangoapps.grades.new.course_grade_factory.log'
)
as
log_mock
:
with
patch
(
'lms.djangoapps.grades.new.course_grade_factory.log'
)
as
log_mock
:
# returns Zero when no grade, with ASSUME_ZERO_GRADE_IF_ABSENT
# returns Zero when no grade, with ASSUME_ZERO_GRADE_IF_ABSENT
with
waffle
()
.
override
(
ASSUME_ZERO_GRADE_IF_ABSENT
,
active
=
True
):
with
waffle
()
.
override
(
ASSUME_ZERO_GRADE_IF_ABSENT
,
active
=
True
):
self
.
_create_course_grade_and_check_logging
(
grade_factory
.
create
,
log_mock
,
u'CreateZero'
)
self
.
_create_course_grade_and_check_logging
(
grade_factory
.
create
,
log_mock
.
info
,
u'CreateZero'
)
# read, but not persisted
# read, but not persisted
self
.
_create_course_grade_and_check_logging
(
grade_factory
.
create
,
log_mock
,
u'Update'
)
self
.
_create_course_grade_and_check_logging
(
grade_factory
.
create
,
log_mock
.
info
,
u'Update'
)
# update and persist
# update and persist
self
.
_create_course_grade_and_check_logging
(
grade_factory
.
update
,
log_mock
,
u'Update'
)
self
.
_create_course_grade_and_check_logging
(
grade_factory
.
update
,
log_mock
.
info
,
u'Update'
)
# read from persistence, using create
# read from persistence, using create
self
.
_create_course_grade_and_check_logging
(
grade_factory
.
create
,
log_mock
,
u'Read'
)
self
.
_create_course_grade_and_check_logging
(
grade_factory
.
create
,
log_mock
.
debug
,
u'Read'
)
# read from persistence, using read
# read from persistence, using read
self
.
_create_course_grade_and_check_logging
(
grade_factory
.
read
,
log_mock
,
u'Read'
)
self
.
_create_course_grade_and_check_logging
(
grade_factory
.
read
,
log_mock
.
debug
,
u'Read'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment