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
7e52ba87
Commit
7e52ba87
authored
Oct 14, 2014
by
Don Mitchell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5535 from edx/dhm/unit_perf
Performance enhancements for unit tests
parents
f3aaa4e6
3c42e8c7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
8 deletions
+50
-8
cms/djangoapps/contentstore/tests/test_contentstore.py
+0
-0
common/lib/xmodule/xmodule/modulestore/tests/test_contentstore.py
+0
-1
common/lib/xmodule/xmodule/poll_module.py
+1
-1
common/lib/xmodule/xmodule/tests/test_export.py
+49
-6
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
7e52ba87
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/modulestore/tests/test_contentstore.py
View file @
7e52ba87
"""
"""
Test contentstore.mongo functionality
Test contentstore.mongo functionality
"""
"""
import
os
import
logging
import
logging
from
uuid
import
uuid4
from
uuid
import
uuid4
import
unittest
import
unittest
...
...
common/lib/xmodule/xmodule/poll_module.py
View file @
7e52ba87
...
@@ -30,7 +30,7 @@ class PollFields(object):
...
@@ -30,7 +30,7 @@ class PollFields(object):
voted
=
Boolean
(
help
=
"Whether this student has voted on the poll"
,
scope
=
Scope
.
user_state
,
default
=
False
)
voted
=
Boolean
(
help
=
"Whether this student has voted on the poll"
,
scope
=
Scope
.
user_state
,
default
=
False
)
poll_answer
=
String
(
help
=
"Student answer"
,
scope
=
Scope
.
user_state
,
default
=
''
)
poll_answer
=
String
(
help
=
"Student answer"
,
scope
=
Scope
.
user_state
,
default
=
''
)
poll_answers
=
Dict
(
help
=
"
All possible answers for the poll fro other
students"
,
scope
=
Scope
.
user_state_summary
)
poll_answers
=
Dict
(
help
=
"
Poll answers from all
students"
,
scope
=
Scope
.
user_state_summary
)
# List of answers, in the form {'id': 'some id', 'text': 'the answer text'}
# List of answers, in the form {'id': 'some id', 'text': 'the answer text'}
answers
=
List
(
help
=
"Poll answers from xml"
,
scope
=
Scope
.
content
,
default
=
[])
answers
=
List
(
help
=
"Poll answers from xml"
,
scope
=
Scope
.
content
,
default
=
[])
...
...
common/lib/xmodule/xmodule/tests/test_export.py
View file @
7e52ba87
...
@@ -230,12 +230,55 @@ class ConvertExportFormat(unittest.TestCase):
...
@@ -230,12 +230,55 @@ class ConvertExportFormat(unittest.TestCase):
# Expand all the test archives and store their paths.
# Expand all the test archives and store their paths.
self
.
data_dir
=
path
(
__file__
)
.
realpath
()
.
parent
/
'data'
self
.
data_dir
=
path
(
__file__
)
.
realpath
()
.
parent
/
'data'
self
.
version0_nodrafts
=
self
.
_expand_archive
(
'Version0_nodrafts.tar.gz'
)
self
.
version1_nodrafts
=
self
.
_expand_archive
(
'Version1_nodrafts.tar.gz'
)
self
.
_version0_nodrafts
=
None
self
.
version0_drafts
=
self
.
_expand_archive
(
'Version0_drafts.tar.gz'
)
self
.
_version1_nodrafts
=
None
self
.
version1_drafts
=
self
.
_expand_archive
(
'Version1_drafts.tar.gz'
)
self
.
_version0_drafts
=
None
self
.
version1_drafts_extra_branch
=
self
.
_expand_archive
(
'Version1_drafts_extra_branch.tar.gz'
)
self
.
_version1_drafts
=
None
self
.
no_version
=
self
.
_expand_archive
(
'NoVersionNumber.tar.gz'
)
self
.
_version1_drafts_extra_branch
=
None
self
.
_no_version
=
None
@property
def
version0_nodrafts
(
self
):
"lazily expand this"
if
self
.
_version0_nodrafts
is
None
:
self
.
_version0_nodrafts
=
self
.
_expand_archive
(
'Version0_nodrafts.tar.gz'
)
return
self
.
_version0_nodrafts
@property
def
version1_nodrafts
(
self
):
"lazily expand this"
if
self
.
_version1_nodrafts
is
None
:
self
.
_version1_nodrafts
=
self
.
_expand_archive
(
'Version1_nodrafts.tar.gz'
)
return
self
.
_version1_nodrafts
@property
def
version0_drafts
(
self
):
"lazily expand this"
if
self
.
_version0_drafts
is
None
:
self
.
_version0_drafts
=
self
.
_expand_archive
(
'Version0_drafts.tar.gz'
)
return
self
.
_version0_drafts
@property
def
version1_drafts
(
self
):
"lazily expand this"
if
self
.
_version1_drafts
is
None
:
self
.
_version1_drafts
=
self
.
_expand_archive
(
'Version1_drafts.tar.gz'
)
return
self
.
_version1_drafts
@property
def
version1_drafts_extra_branch
(
self
):
"lazily expand this"
if
self
.
_version1_drafts_extra_branch
is
None
:
self
.
_version1_drafts_extra_branch
=
self
.
_expand_archive
(
'Version1_drafts_extra_branch.tar.gz'
)
return
self
.
_version1_drafts_extra_branch
@property
def
no_version
(
self
):
"lazily expand this"
if
self
.
_no_version
is
None
:
self
.
_no_version
=
self
.
_expand_archive
(
'NoVersionNumber.tar.gz'
)
return
self
.
_no_version
def
tearDown
(
self
):
def
tearDown
(
self
):
""" Common cleanup. """
""" Common cleanup. """
...
...
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