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
1e47f853
Commit
1e47f853
authored
May 26, 2015
by
Ben Patterson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8172 from edx/benp/revert-pycontracts-enablement
Revert "Enable PyContracts during tests"
parents
1c913c1e
176770ef
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
24 deletions
+20
-24
cms/djangoapps/contentstore/views/tests/test_assets.py
+7
-8
lms/djangoapps/courseware/tests/test_module_render.py
+2
-2
lms/djangoapps/lms_xblock/test/test_runtime.py
+8
-9
lms/djangoapps/open_ended_grading/tests.py
+1
-2
manage.py
+1
-2
pavelib/utils/test/suites/nose_suite.py
+1
-1
No files found.
cms/djangoapps/contentstore/views/tests/test_assets.py
View file @
1e47f853
...
@@ -309,14 +309,13 @@ class DownloadTestCase(AssetsTestCase):
...
@@ -309,14 +309,13 @@ class DownloadTestCase(AssetsTestCase):
def
test_metadata_found_in_modulestore
(
self
):
def
test_metadata_found_in_modulestore
(
self
):
# Insert asset metadata into the modulestore (with no accompanying asset).
# Insert asset metadata into the modulestore (with no accompanying asset).
asset_key
=
self
.
course
.
id
.
make_asset_key
(
AssetMetadata
.
GENERAL_ASSET_TYPE
,
'pic1.jpg'
)
asset_key
=
self
.
course
.
id
.
make_asset_key
(
AssetMetadata
.
GENERAL_ASSET_TYPE
,
'pic1.jpg'
)
asset_md
=
AssetMetadata
(
asset_md
=
AssetMetadata
(
asset_key
,
{
asset_key
,
'internal_name'
:
'EKMND332DDBK'
,
internal_name
=
'EKMND332DDBK'
,
'basename'
:
'pix/archive'
,
pathname
=
'pix/archive'
,
'locked'
:
False
,
locked
=
False
,
'curr_version'
:
'14'
,
curr_version
=
'14'
,
'prev_version'
:
'13'
prev_version
=
'13'
,
})
)
modulestore
()
.
save_asset_metadata
(
asset_md
,
15
)
modulestore
()
.
save_asset_metadata
(
asset_md
,
15
)
# Get the asset metadata and have it be found in the modulestore.
# Get the asset metadata and have it be found in the modulestore.
# Currently, no asset metadata should be found in the modulestore. The code is not yet storing it there.
# Currently, no asset metadata should be found in the modulestore. The code is not yet storing it there.
...
...
lms/djangoapps/courseware/tests/test_module_render.py
View file @
1e47f853
...
@@ -48,7 +48,7 @@ from xmodule.modulestore import ModuleStoreEnum
...
@@ -48,7 +48,7 @@ from xmodule.modulestore import ModuleStoreEnum
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
from
xmodule.modulestore.tests.factories
import
ItemFactory
,
CourseFactory
,
check_mongo_calls
from
xmodule.modulestore.tests.factories
import
ItemFactory
,
CourseFactory
,
check_mongo_calls
from
xmodule.x_module
import
XModuleDescriptor
,
XModule
,
STUDENT_VIEW
,
CombinedSystem
,
DescriptorSystem
from
xmodule.x_module
import
XModuleDescriptor
,
XModule
,
STUDENT_VIEW
,
CombinedSystem
TEST_DATA_DIR
=
settings
.
COMMON_TEST_DATA_ROOT
TEST_DATA_DIR
=
settings
.
COMMON_TEST_DATA_ROOT
...
@@ -1108,7 +1108,7 @@ class TestAnonymousStudentId(ModuleStoreTestCase, LoginEnrollmentTestCase):
...
@@ -1108,7 +1108,7 @@ class TestAnonymousStudentId(ModuleStoreTestCase, LoginEnrollmentTestCase):
location
=
location
,
location
=
location
,
static_asset_path
=
None
,
static_asset_path
=
None
,
_runtime
=
Mock
(
_runtime
=
Mock
(
spec
=
DescriptorSystem
,
spec
=
Runtime
,
resources_fs
=
None
,
resources_fs
=
None
,
mixologist
=
Mock
(
_mixins
=
(),
name
=
'mixologist'
),
mixologist
=
Mock
(
_mixins
=
(),
name
=
'mixologist'
),
name
=
'runtime'
,
name
=
'runtime'
,
...
...
lms/djangoapps/lms_xblock/test/test_runtime.py
View file @
1e47f853
...
@@ -11,7 +11,6 @@ from urlparse import urlparse
...
@@ -11,7 +11,6 @@ from urlparse import urlparse
from
opaque_keys.edx.locations
import
SlashSeparatedCourseKey
from
opaque_keys.edx.locations
import
SlashSeparatedCourseKey
from
lms.djangoapps.lms_xblock.runtime
import
quote_slashes
,
unquote_slashes
,
LmsModuleSystem
from
lms.djangoapps.lms_xblock.runtime
import
quote_slashes
,
unquote_slashes
,
LmsModuleSystem
from
xblock.fields
import
ScopeIds
from
xblock.fields
import
ScopeIds
from
xmodule.x_module
import
DescriptorSystem
TEST_STRINGS
=
[
TEST_STRINGS
=
[
''
,
''
,
...
@@ -49,12 +48,12 @@ class TestHandlerUrl(TestCase):
...
@@ -49,12 +48,12 @@ class TestHandlerUrl(TestCase):
self
.
course_key
=
SlashSeparatedCourseKey
(
"org"
,
"course"
,
"run"
)
self
.
course_key
=
SlashSeparatedCourseKey
(
"org"
,
"course"
,
"run"
)
self
.
runtime
=
LmsModuleSystem
(
self
.
runtime
=
LmsModuleSystem
(
static_url
=
'/static'
,
static_url
=
'/static'
,
track_function
=
Mock
(
name
=
'track_function'
),
track_function
=
Mock
(),
get_module
=
Mock
(
name
=
'get_module'
),
get_module
=
Mock
(),
render_template
=
Mock
(
name
=
'render_template'
),
render_template
=
Mock
(),
replace_urls
=
str
,
replace_urls
=
str
,
course_id
=
self
.
course_key
,
course_id
=
self
.
course_key
,
descriptor_runtime
=
Mock
(
spec
=
DescriptorSystem
,
name
=
'descriptor_runtime'
),
descriptor_runtime
=
Mock
(),
)
)
def
test_trailing_characters
(
self
):
def
test_trailing_characters
(
self
):
...
@@ -121,13 +120,13 @@ class TestUserServiceAPI(TestCase):
...
@@ -121,13 +120,13 @@ class TestUserServiceAPI(TestCase):
self
.
runtime
=
LmsModuleSystem
(
self
.
runtime
=
LmsModuleSystem
(
static_url
=
'/static'
,
static_url
=
'/static'
,
track_function
=
Mock
(
name
=
"track_function"
),
track_function
=
Mock
(),
get_module
=
Mock
(
name
=
"get_module"
),
get_module
=
Mock
(),
render_template
=
Mock
(
name
=
"render_template"
),
render_template
=
Mock
(),
replace_urls
=
str
,
replace_urls
=
str
,
course_id
=
self
.
course_id
,
course_id
=
self
.
course_id
,
get_real_user
=
mock_get_real_user
,
get_real_user
=
mock_get_real_user
,
descriptor_runtime
=
Mock
(
spec
=
DescriptorSystem
,
name
=
"descriptor_runtime"
),
descriptor_runtime
=
Mock
(),
)
)
self
.
scope
=
'course'
self
.
scope
=
'course'
self
.
key
=
'key1'
self
.
key
=
'key1'
...
...
lms/djangoapps/open_ended_grading/tests.py
View file @
1e47f853
...
@@ -24,7 +24,6 @@ from lms.djangoapps.lms_xblock.runtime import LmsModuleSystem
...
@@ -24,7 +24,6 @@ from lms.djangoapps.lms_xblock.runtime import LmsModuleSystem
from
student.roles
import
CourseStaffRole
from
student.roles
import
CourseStaffRole
from
student.models
import
unique_id_for_user
from
student.models
import
unique_id_for_user
from
xmodule
import
peer_grading_module
from
xmodule
import
peer_grading_module
from
xmodule.x_module
import
DescriptorSystem
from
xmodule.error_module
import
ErrorDescriptor
from
xmodule.error_module
import
ErrorDescriptor
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
...
@@ -289,7 +288,7 @@ class TestPeerGradingService(ModuleStoreTestCase, LoginEnrollmentTestCase):
...
@@ -289,7 +288,7 @@ class TestPeerGradingService(ModuleStoreTestCase, LoginEnrollmentTestCase):
open_ended_grading_interface
=
test_util_open_ended
.
OPEN_ENDED_GRADING_INTERFACE
,
open_ended_grading_interface
=
test_util_open_ended
.
OPEN_ENDED_GRADING_INTERFACE
,
mixins
=
settings
.
XBLOCK_MIXINS
,
mixins
=
settings
.
XBLOCK_MIXINS
,
error_descriptor_class
=
ErrorDescriptor
,
error_descriptor_class
=
ErrorDescriptor
,
descriptor_runtime
=
Mock
(
spec
=
DescriptorSystem
,
name
=
"descriptor_runtime"
)
,
descriptor_runtime
=
None
,
)
)
self
.
descriptor
=
peer_grading_module
.
PeerGradingDescriptor
(
self
.
system
,
field_data
,
ScopeIds
(
None
,
None
,
None
,
None
))
self
.
descriptor
=
peer_grading_module
.
PeerGradingDescriptor
(
self
.
system
,
field_data
,
ScopeIds
(
None
,
None
,
None
,
None
))
self
.
descriptor
.
xmodule_runtime
=
self
.
system
self
.
descriptor
.
xmodule_runtime
=
self
.
system
...
...
manage.py
View file @
1e47f853
...
@@ -113,5 +113,4 @@ if __name__ == "__main__":
...
@@ -113,5 +113,4 @@ if __name__ == "__main__":
from
django.core.management
import
execute_from_command_line
from
django.core.management
import
execute_from_command_line
sys
.
argv
[
1
:]
=
django_args
execute_from_command_line
([
sys
.
argv
[
0
]]
+
django_args
)
execute_from_command_line
(
sys
.
argv
)
pavelib/utils/test/suites/nose_suite.py
View file @
1e47f853
...
@@ -120,7 +120,7 @@ class SystemTestSuite(NoseTestSuite):
...
@@ -120,7 +120,7 @@ class SystemTestSuite(NoseTestSuite):
@property
@property
def
cmd
(
self
):
def
cmd
(
self
):
cmd
=
(
cmd
=
(
'./manage.py {system}
--contracts
test --verbosity={verbosity} '
'./manage.py {system} test --verbosity={verbosity} '
'{test_id} {test_opts} --traceback --settings=test {extra} '
'{test_id} {test_opts} --traceback --settings=test {extra} '
'--with-xunit --xunit-file={xunit_report}'
.
format
(
'--with-xunit --xunit-file={xunit_report}'
.
format
(
system
=
self
.
root
,
system
=
self
.
root
,
...
...
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