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
71df263f
Commit
71df263f
authored
Aug 20, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable all course db related signals
parent
1f50da88
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
lms/djangoapps/django_comment_client/tests.py
+14
-4
No files found.
lms/djangoapps/django_comment_client/tests.py
View file @
71df263f
from
django.contrib.auth.models
import
User
from
django.contrib.auth.models
import
User
from
django.utils
import
unittest
from
django.utils
import
unittest
from
student.models
import
CourseEnrollment
,
replicate_enrollment_save
,
replicate_enrollment_delete
from
student.models
import
CourseEnrollment
,
\
replicate_enrollment_save
,
\
replicate_enrollment_delete
,
\
update_user_information
,
\
replicate_user_save
from
django.db.models.signals
import
m2m_changed
,
pre_delete
,
pre_save
,
post_delete
,
post_save
from
django.db.models.signals
import
m2m_changed
,
pre_delete
,
pre_save
,
post_delete
,
post_save
from
django.dispatch.dispatcher
import
_make_id
from
django.dispatch.dispatcher
import
_make_id
import
string
import
string
...
@@ -114,7 +119,12 @@ class PermissionsTestCase(NoSignalTestCase):
...
@@ -114,7 +119,12 @@ class PermissionsTestCase(NoSignalTestCase):
def
setUp
(
self
):
def
setUp
(
self
):
sender_receivers_to_discard
=
[(
replicate_enrollment_save
,
CourseEnrollment
),
(
replicate_enrollment_delete
,
CourseEnrollment
)]
sender_receivers_to_discard
=
[
(
replicate_enrollment_save
,
CourseEnrollment
),
(
replicate_enrollment_delete
,
CourseEnrollment
),
(
update_user_information
,
User
),
(
replicate_user_save
,
User
),
]
super
(
PermissionsTestCase
,
self
)
.
setUp
(
sender_receivers_to_discard
=
sender_receivers_to_discard
)
super
(
PermissionsTestCase
,
self
)
.
setUp
(
sender_receivers_to_discard
=
sender_receivers_to_discard
)
self
.
course_id
=
"MITx/6.002x/2012_Fall"
self
.
course_id
=
"MITx/6.002x/2012_Fall"
...
@@ -132,10 +142,10 @@ class PermissionsTestCase(NoSignalTestCase):
...
@@ -132,10 +142,10 @@ class PermissionsTestCase(NoSignalTestCase):
self
.
moderator_enrollment
=
CourseEnrollment
.
objects
.
create
(
user
=
self
.
moderator
,
course_id
=
self
.
course_id
)
self
.
moderator_enrollment
=
CourseEnrollment
.
objects
.
create
(
user
=
self
.
moderator
,
course_id
=
self
.
course_id
)
def
tearDown
(
self
):
def
tearDown
(
self
):
self
.
student
.
delete
()
self
.
moderator
.
delete
()
self
.
student_enrollment
.
delete
()
self
.
student_enrollment
.
delete
()
self
.
moderator_enrollment
.
delete
()
self
.
moderator_enrollment
.
delete
()
self
.
student
.
delete
()
self
.
moderator
.
delete
()
super
(
PermissionsTestCase
,
self
)
.
tearDown
()
super
(
PermissionsTestCase
,
self
)
.
tearDown
()
def
testDefaultRoles
(
self
):
def
testDefaultRoles
(
self
):
...
...
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