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
8165a033
Commit
8165a033
authored
Aug 21, 2013
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pep8/pylint fixes
Fixed test_masquerade failure due to not clearing the modulestore between tests.
parent
109d3c3d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
23 additions
and
13 deletions
+23
-13
common/djangoapps/course_groups/tests/tests.py
+1
-1
common/djangoapps/external_auth/tests/test_shib.py
+1
-1
common/lib/xmodule/xmodule/js/libpeerconnection.log
+0
-0
common/lib/xmodule/xmodule/modulestore/django.py
+1
-2
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
+1
-2
lms/djangoapps/courseware/tests/modulestore_config.py
+6
-2
lms/djangoapps/courseware/tests/test_masquerade.py
+7
-2
lms/djangoapps/courseware/tests/tests.py
+3
-3
lms/djangoapps/instructor/tests/test_access.py
+1
-0
lms/djangoapps/instructor/tests/test_legacy_xss.py
+1
-0
lms/djangoapps/staticbook/tests.py
+1
-0
No files found.
common/djangoapps/course_groups/tests/tests.py
View file @
8165a033
...
...
@@ -17,7 +17,7 @@ from xmodule.modulestore.tests.django_utils import mixed_store_config
# cms.envs.test doesn't.
TEST_DATA_DIR
=
settings
.
COMMON_TEST_DATA_ROOT
TEST_MAPPING
=
{
'edX/toy/2012_Fall'
:
'xml'
}
TEST_MAPPING
=
{
'edX/toy/2012_Fall'
:
'xml'
}
TEST_DATA_MIXED_MODULESTORE
=
mixed_store_config
(
TEST_DATA_DIR
,
TEST_MAPPING
)
...
...
common/djangoapps/external_auth/tests/test_shib.py
View file @
8165a033
...
...
@@ -18,7 +18,7 @@ from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from
xmodule.modulestore.inheritance
import
own_metadata
from
xmodule.modulestore.django
import
editable_modulestore
from
courseware.tests.
tests
import
TEST_DATA_MIXED_MODULESTORE
from
courseware.tests.
modulestore_config
import
TEST_DATA_MIXED_MODULESTORE
from
external_auth.models
import
ExternalAuthMap
from
external_auth.views
import
shib_login
,
course_specific_login
,
course_specific_register
...
...
common/lib/xmodule/xmodule/js/libpeerconnection.log
0 → 100644
View file @
8165a033
common/lib/xmodule/xmodule/modulestore/django.py
View file @
8165a033
...
...
@@ -103,10 +103,9 @@ def editable_modulestore(name='default'):
store
=
store
.
modulestores
[
'default'
]
# At this point, we either have the ability to create
# items in the store, or we do not.
# items in the store, or we do not.
if
hasattr
(
store
,
'create_xmodule'
):
return
store
else
:
return
None
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
View file @
8165a033
...
...
@@ -5,8 +5,7 @@ Modulestore configuration for test cases.
from
uuid
import
uuid4
from
django.test
import
TestCase
from
xmodule.modulestore.django
import
editable_modulestore
,
\
editable_modulestore
,
clear_existing_modulestores
from
unittest.util
import
safe_repr
clear_existing_modulestores
def
mixed_store_config
(
data_dir
,
mappings
):
...
...
lms/djangoapps/courseware/tests/modulestore_config.py
View file @
8165a033
"""
Define test configuration for modulestores.
"""
from
xmodule.modulestore.tests.django_utils
import
xml_store_config
,
\
mongo_store_config
,
draft_mongo_store_config
,
\
mixed_store_config
mongo_store_config
,
draft_mongo_store_config
,
\
mixed_store_config
from
django.conf
import
settings
...
...
lms/djangoapps/courseware/tests/test_masquerade.py
View file @
8165a033
...
...
@@ -16,17 +16,22 @@ from django.contrib.auth.models import Group, User
from
courseware.access
import
_course_staff_group_name
from
courseware.tests.helpers
import
LoginEnrollmentTestCase
from
courseware.tests.modulestore_config
import
TEST_DATA_MIXED_MODULESTORE
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
from
xmodule.modulestore.django
import
modulestore
,
clear_existing_modulestores
import
json
@override_settings
(
MODULESTORE
=
TEST_DATA_MIXED_MODULESTORE
)
class
TestStaffMasqueradeAsStudent
(
LoginEnrollmentTestCase
):
class
TestStaffMasqueradeAsStudent
(
ModuleStoreTestCase
,
LoginEnrollmentTestCase
):
"""
Check for staff being able to masquerade as student.
"""
def
setUp
(
self
):
# Clear out the modulestores, causing them to reload
clear_existing_modulestores
()
self
.
graded_course
=
modulestore
()
.
get_course
(
"edX/graded/2012_Fall"
)
# Create staff account
...
...
lms/djangoapps/courseware/tests/tests.py
View file @
8165a033
...
...
@@ -64,9 +64,9 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
)
items
=
store
.
get_items
(
location_query
,
course_id
=
course_id
,
depth
=
2
location_query
,
course_id
=
course_id
,
depth
=
2
)
if
len
(
items
)
<
1
:
...
...
lms/djangoapps/instructor/tests/test_access.py
View file @
8165a033
...
...
@@ -85,6 +85,7 @@ class TestInstructorAccessAllow(ModuleStoreTestCase):
group
=
Group
.
objects
.
get
(
name
=
get_access_group_name
(
self
.
course
,
'staff'
))
self
.
assertIn
(
user
,
group
.
user_set
.
all
())
@override_settings
(
MODULESTORE
=
TEST_DATA_MIXED_MODULESTORE
)
class
TestInstructorAccessRevoke
(
ModuleStoreTestCase
):
""" Test access revoke. """
...
...
lms/djangoapps/instructor/tests/test_legacy_xss.py
View file @
8165a033
...
...
@@ -14,6 +14,7 @@ from xmodule.modulestore.tests.factories import CourseFactory
from
instructor.views
import
legacy
@override_settings
(
MODULESTORE
=
TEST_DATA_MIXED_MODULESTORE
)
class
TestXss
(
ModuleStoreTestCase
):
def
setUp
(
self
):
...
...
lms/djangoapps/staticbook/tests.py
View file @
8165a033
...
...
@@ -36,6 +36,7 @@ HTML_BOOK = {
],
}
@override_settings
(
MODULESTORE
=
TEST_DATA_MIXED_MODULESTORE
)
class
StaticBookTest
(
ModuleStoreTestCase
):
"""
...
...
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