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
d3fc2625
Commit
d3fc2625
authored
Feb 17, 2016
by
Mushtaq Ali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code refactor pass store_type in course create method
parent
3559bd1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
cms/djangoapps/contentstore/views/tests/test_item.py
+18
-19
No files found.
cms/djangoapps/contentstore/views/tests/test_item.py
View file @
d3fc2625
...
...
@@ -2181,22 +2181,21 @@ class TestXBlockPublishingInfo(ItemTest):
"""
SelfPacedConfiguration
(
enabled
=
True
)
.
save
()
with
self
.
store
.
default_store
(
store_type
):
# Create course, chapter and setup future release date to make chapter in scheduled state
course
=
CourseFactory
.
create
()
chapter
=
self
.
_create_child
(
course
,
'chapter'
,
"Test Chapter"
)
self
.
_set_release_date
(
chapter
.
location
,
datetime
.
now
(
UTC
)
+
timedelta
(
days
=
1
))
# Check that has scheduled state
xblock_info
=
self
.
_get_xblock_info
(
chapter
.
location
)
self
.
_verify_visibility_state
(
xblock_info
,
VisibilityState
.
ready
)
self
.
assertFalse
(
course
.
self_paced
)
# Change course pacing to self paced
course
.
self_paced
=
True
self
.
store
.
update_item
(
course
,
self
.
user
.
id
)
self
.
assertTrue
(
course
.
self_paced
)
# Check that in self paced course content has live state now
xblock_info
=
self
.
_get_xblock_info
(
chapter
.
location
)
self
.
_verify_visibility_state
(
xblock_info
,
VisibilityState
.
live
)
# Create course, chapter and setup future release date to make chapter in scheduled state
course
=
CourseFactory
.
create
(
default_store
=
store_type
)
chapter
=
self
.
_create_child
(
course
,
'chapter'
,
"Test Chapter"
)
self
.
_set_release_date
(
chapter
.
location
,
datetime
.
now
(
UTC
)
+
timedelta
(
days
=
1
))
# Check that chapter has scheduled state
xblock_info
=
self
.
_get_xblock_info
(
chapter
.
location
)
self
.
_verify_visibility_state
(
xblock_info
,
VisibilityState
.
ready
)
self
.
assertFalse
(
course
.
self_paced
)
# Change course pacing to self paced
course
.
self_paced
=
True
self
.
store
.
update_item
(
course
,
self
.
user
.
id
)
self
.
assertTrue
(
course
.
self_paced
)
# Check that in self paced course content has live state now
xblock_info
=
self
.
_get_xblock_info
(
chapter
.
location
)
self
.
_verify_visibility_state
(
xblock_info
,
VisibilityState
.
live
)
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