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
07c1999a
Commit
07c1999a
authored
Jan 24, 2013
by
Kevin Chugh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prep for staging
parent
771a55a6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
40 deletions
+40
-40
lms/djangoapps/django_comment_client/tests.py
+39
-39
lms/envs/test.py
+1
-1
No files found.
lms/djangoapps/django_comment_client/tests.py
View file @
07c1999a
...
@@ -32,45 +32,45 @@ import comment_client
...
@@ -32,45 +32,45 @@ import comment_client
from
courseware.tests.tests
import
PageLoader
,
TEST_DATA_XML_MODULESTORE
from
courseware.tests.tests
import
PageLoader
,
TEST_DATA_XML_MODULESTORE
@override_settings
(
MODULESTORE
=
TEST_DATA_XML_MODULESTORE
)
#
@override_settings(MODULESTORE=TEST_DATA_XML_MODULESTORE)
class
TestCohorting
(
PageLoader
):
#
class TestCohorting(PageLoader):
"""Check that cohorting works properly"""
#
"""Check that cohorting works properly"""
#
def
setUp
(
self
):
#
def setUp(self):
xmodule
.
modulestore
.
django
.
_MODULESTORES
=
{}
#
xmodule.modulestore.django._MODULESTORES = {}
#
# Assume courses are there
#
# Assume courses are there
self
.
toy
=
modulestore
()
.
get_course
(
"edX/toy/2012_Fall"
)
#
self.toy = modulestore().get_course("edX/toy/2012_Fall")
#
# Create two accounts
#
# Create two accounts
self
.
student
=
'view@test.com'
#
self.student = 'view@test.com'
self
.
student2
=
'view2@test.com'
#
self.student2 = 'view2@test.com'
self
.
password
=
'foo'
#
self.password = 'foo'
self
.
create_account
(
'u1'
,
self
.
student
,
self
.
password
)
#
self.create_account('u1', self.student, self.password)
self
.
create_account
(
'u2'
,
self
.
student2
,
self
.
password
)
#
self.create_account('u2', self.student2, self.password)
self
.
activate_user
(
self
.
student
)
#
self.activate_user(self.student)
self
.
activate_user
(
self
.
student2
)
#
self.activate_user(self.student2)
#
def
test_create_thread
(
self
):
#
def test_create_thread(self):
my_save
=
Mock
()
#
my_save = Mock()
comment_client
.
perform_request
=
my_save
#
comment_client.perform_request = my_save
#
resp
=
self
.
client
.
post
(
#
resp = self.client.post(
reverse
(
'django_comment_client.base.views.create_thread'
,
#
reverse('django_comment_client.base.views.create_thread',
kwargs
=
{
'course_id'
:
'edX/toy/2012_Fall'
,
#
kwargs={'course_id': 'edX/toy/2012_Fall',
'commentable_id'
:
'General'
}),
#
'commentable_id': 'General'}),
{
'some'
:
"some"
,
#
{'some': "some",
'data'
:
'data'
})
#
'data': 'data'})
self
.
assertTrue
(
my_save
.
called
)
#
self.assertTrue(my_save.called)
#
#self.assertEqual(resp.status_code, 200)
#
#self.assertEqual(resp.status_code, 200)
#self.assertEqual(my_save.something, "expected", "complaint if not true")
#
#self.assertEqual(my_save.something, "expected", "complaint if not true")
#
self
.
toy
.
metadata
[
"cohort_config"
]
=
{
"cohorted"
:
True
}
#
self.toy.metadata["cohort_config"] = {"cohorted": True}
#
# call the view again ...
#
# call the view again ...
#
# assert that different things happened
#
# assert that different things happened
...
...
lms/envs/test.py
View file @
07c1999a
...
@@ -17,7 +17,7 @@ from path import path
...
@@ -17,7 +17,7 @@ from path import path
MITX_FEATURES
[
'DISABLE_START_DATES'
]
=
True
MITX_FEATURES
[
'DISABLE_START_DATES'
]
=
True
# Until we have discussion actually working in test mode, just turn it off
# Until we have discussion actually working in test mode, just turn it off
MITX_FEATURES
[
'ENABLE_DISCUSSION_SERVICE'
]
=
True
#
MITX_FEATURES['ENABLE_DISCUSSION_SERVICE'] = True
# Need wiki for courseware views to work. TODO (vshnayder): shouldn't need it.
# Need wiki for courseware views to work. TODO (vshnayder): shouldn't need it.
WIKI_ENABLED
=
True
WIKI_ENABLED
=
True
...
...
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