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
d17aedf3
Commit
d17aedf3
authored
Jan 24, 2013
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the reverse isn't working for some reason... need to figure it out
parent
0b7e7b35
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
lms/djangoapps/django_comment_client/tests.py
+18
-2
No files found.
lms/djangoapps/django_comment_client/tests.py
View file @
d17aedf3
...
...
@@ -4,6 +4,9 @@ from django.test import TestCase
from
django.test.client
import
RequestFactory
from
django.conf
import
settings
from
django.core.urlresolvers
import
reverse
from
mock
import
Mock
from
override_settings
import
override_settings
import
xmodule.modulestore.django
...
...
@@ -26,6 +29,7 @@ from xmodule.modulestore import Location
from
xmodule.modulestore.xml_importer
import
import_from_xml
from
xmodule.modulestore.xml
import
XMLModuleStore
import
comment_client
from
courseware.tests.tests
import
PageLoader
,
TEST_DATA_XML_MODULESTORE
...
...
@@ -49,13 +53,25 @@ class TestCohorting(PageLoader):
self
.
activate_user
(
self
.
student2
)
def
test_create_thread
(
self
):
resp
=
self
.
client
.
post
(
reverse
(
'create_thread'
),
my_save
=
Mock
()
comment_client
.
perform_request
=
my_save
resp
=
self
.
client
.
post
(
reverse
(
'django_comment_client.base.views.create_thread'
,
kwargs
=
{
'course_id'
:
'edX/toy/2012_Fall'
,
'commentable_id'
:
'General'
}),
{
'some'
:
"some"
,
'data'
:
'data'
})
self
.
assertEqual
(
resp
.
status_code
,
200
)
self
.
assertTrue
(
my_save
.
called
)
#self.assertEqual(resp.status_code, 200)
#self.assertEqual(my_save.something, "expected", "complaint if not true")
self
.
toy
.
metadata
[
"cohort_config"
]
=
{
"cohorted"
:
True
}
# call the view again ...
# assert that different things happened
...
...
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