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
e4af7287
Commit
e4af7287
authored
Jun 18, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial testing for parallelization
parent
5ba6855d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletions
+8
-1
cms/djangoapps/contentstore/tests/test_contentstore.py
+6
-0
cms/envs/test.py
+1
-1
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
+1
-0
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
e4af7287
...
@@ -43,10 +43,13 @@ from django_comment_common.utils import are_permissions_roles_seeded
...
@@ -43,10 +43,13 @@ from django_comment_common.utils import are_permissions_roles_seeded
from
xmodule.exceptions
import
InvalidVersionError
from
xmodule.exceptions
import
InvalidVersionError
import
datetime
import
datetime
from
pytz
import
UTC
from
pytz
import
UTC
#from uuid import uuid4
TEST_DATA_MODULESTORE
=
copy
.
deepcopy
(
settings
.
MODULESTORE
)
TEST_DATA_MODULESTORE
=
copy
.
deepcopy
(
settings
.
MODULESTORE
)
TEST_DATA_MODULESTORE
[
'default'
][
'OPTIONS'
][
'fs_root'
]
=
path
(
'common/test/data'
)
TEST_DATA_MODULESTORE
[
'default'
][
'OPTIONS'
][
'fs_root'
]
=
path
(
'common/test/data'
)
TEST_DATA_MODULESTORE
[
'direct'
][
'OPTIONS'
][
'fs_root'
]
=
path
(
'common/test/data'
)
TEST_DATA_MODULESTORE
[
'direct'
][
'OPTIONS'
][
'fs_root'
]
=
path
(
'common/test/data'
)
TEST_DATA_CONTENTSTORE
=
copy
.
deepcopy
(
settings
.
CONTENTSTORE
)
TEST_DATA_CONTENTSTORE
[
'OPTIONS'
][
'db'
]
=
'test_xcontent_
%
s'
%
4
#uuid4().hex
class
MongoCollectionFindWrapper
(
object
):
class
MongoCollectionFindWrapper
(
object
):
...
@@ -60,6 +63,7 @@ class MongoCollectionFindWrapper(object):
...
@@ -60,6 +63,7 @@ class MongoCollectionFindWrapper(object):
@override_settings
(
MODULESTORE
=
TEST_DATA_MODULESTORE
)
@override_settings
(
MODULESTORE
=
TEST_DATA_MODULESTORE
)
@override_settings
(
CONTENTSTORE
=
TEST_DATA_CONTENTSTORE
)
class
ContentStoreToyCourseTest
(
ModuleStoreTestCase
):
class
ContentStoreToyCourseTest
(
ModuleStoreTestCase
):
"""
"""
Tests that rely on the toy courses.
Tests that rely on the toy courses.
...
@@ -83,6 +87,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
...
@@ -83,6 +87,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
self
.
client
=
Client
()
self
.
client
=
Client
()
self
.
client
.
login
(
username
=
uname
,
password
=
password
)
self
.
client
.
login
(
username
=
uname
,
password
=
password
)
def
check_components_on_page
(
self
,
component_types
,
expected_types
):
def
check_components_on_page
(
self
,
component_types
,
expected_types
):
"""
"""
Ensure that the right types end up on the page.
Ensure that the right types end up on the page.
...
@@ -809,6 +814,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
...
@@ -809,6 +814,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
export_to_xml
(
module_store
,
content_store
,
location
,
root_dir
,
'test_export'
)
export_to_xml
(
module_store
,
content_store
,
location
,
root_dir
,
'test_export'
)
@override_settings
(
CONTENTSTORE
=
TEST_DATA_CONTENTSTORE
)
class
ContentStoreTest
(
ModuleStoreTestCase
):
class
ContentStoreTest
(
ModuleStoreTestCase
):
"""
"""
Tests for the CMS ContentStore application.
Tests for the CMS ContentStore application.
...
...
cms/envs/test.py
View file @
e4af7287
...
@@ -70,7 +70,7 @@ CONTENTSTORE = {
...
@@ -70,7 +70,7 @@ CONTENTSTORE = {
'ENGINE'
:
'xmodule.contentstore.mongo.MongoContentStore'
,
'ENGINE'
:
'xmodule.contentstore.mongo.MongoContentStore'
,
'OPTIONS'
:
{
'OPTIONS'
:
{
'host'
:
'localhost'
,
'host'
:
'localhost'
,
'db'
:
'test_x
module
'
,
'db'
:
'test_x
content
'
,
},
},
# allow for additional options that can be keyed on a name, e.g. 'trashcan'
# allow for additional options that can be keyed on a name, e.g. 'trashcan'
'ADDITIONAL_OPTIONS'
:
{
'ADDITIONAL_OPTIONS'
:
{
...
...
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
View file @
e4af7287
...
@@ -27,6 +27,7 @@ class ModuleStoreTestCase(TestCase):
...
@@ -27,6 +27,7 @@ class ModuleStoreTestCase(TestCase):
# Remove everything except templates
# Remove everything except templates
modulestore
.
collection
.
remove
(
query
)
modulestore
.
collection
.
remove
(
query
)
modulestore
.
collection
.
drop
()
@staticmethod
@staticmethod
def
load_templates_if_necessary
():
def
load_templates_if_necessary
():
...
...
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