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
6a6ef0fd
Commit
6a6ef0fd
authored
Feb 05, 2016
by
Toby Lawrence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some broken tests.
parent
ad9498ec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
23 deletions
+20
-23
lms/djangoapps/courseware/tests/test_navigation.py
+19
-22
openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py
+1
-1
No files found.
lms/djangoapps/courseware/tests/test_navigation.py
View file @
6a6ef0fd
...
@@ -17,54 +17,51 @@ from xmodule.modulestore.django import modulestore
...
@@ -17,54 +17,51 @@ from xmodule.modulestore.django import modulestore
@attr
(
'shard_1'
)
@attr
(
'shard_1'
)
class
TestNavigation
(
Shared
ModuleStoreTestCase
,
LoginEnrollmentTestCase
):
class
TestNavigation
(
ModuleStoreTestCase
,
LoginEnrollmentTestCase
):
"""
"""
Check that navigation state is saved properly.
Check that navigation state is saved properly.
"""
"""
STUDENT_INFO
=
[(
'view@test.com'
,
'foo'
),
(
'view2@test.com'
,
'foo'
)]
STUDENT_INFO
=
[(
'view@test.com'
,
'foo'
),
(
'view2@test.com'
,
'foo'
)]
@classmethod
def
setUp
(
self
):
def
setUpClass
(
cls
):
super
(
TestNavigation
,
self
)
.
setUp
()
super
(
TestNavigation
,
cls
)
.
setUpClass
()
cls
.
test_course
=
CourseFactory
.
create
()
self
.
test_course
=
CourseFactory
.
create
()
cls
.
course
=
CourseFactory
.
create
()
self
.
course
=
CourseFactory
.
create
()
cls
.
chapter0
=
ItemFactory
.
create
(
parent
=
cls
.
course
,
self
.
chapter0
=
ItemFactory
.
create
(
parent
=
self
.
course
,
display_name
=
'Overview'
)
display_name
=
'Overview'
)
cls
.
chapter9
=
ItemFactory
.
create
(
parent
=
cls
.
course
,
self
.
chapter9
=
ItemFactory
.
create
(
parent
=
self
.
course
,
display_name
=
'factory_chapter'
)
display_name
=
'factory_chapter'
)
cls
.
section0
=
ItemFactory
.
create
(
parent
=
cls
.
chapter0
,
self
.
section0
=
ItemFactory
.
create
(
parent
=
self
.
chapter0
,
display_name
=
'Welcome'
)
display_name
=
'Welcome'
)
cls
.
section9
=
ItemFactory
.
create
(
parent
=
cls
.
chapter9
,
self
.
section9
=
ItemFactory
.
create
(
parent
=
self
.
chapter9
,
display_name
=
'factory_section'
)
display_name
=
'factory_section'
)
cls
.
unit0
=
ItemFactory
.
create
(
parent
=
cls
.
section0
,
self
.
unit0
=
ItemFactory
.
create
(
parent
=
self
.
section0
,
display_name
=
'New Unit'
)
display_name
=
'New Unit'
)
cls
.
chapterchrome
=
ItemFactory
.
create
(
parent
=
cls
.
course
,
self
.
chapterchrome
=
ItemFactory
.
create
(
parent
=
self
.
course
,
display_name
=
'Chrome'
)
display_name
=
'Chrome'
)
cls
.
chromelesssection
=
ItemFactory
.
create
(
parent
=
cls
.
chapterchrome
,
self
.
chromelesssection
=
ItemFactory
.
create
(
parent
=
self
.
chapterchrome
,
display_name
=
'chromeless'
,
display_name
=
'chromeless'
,
chrome
=
'none'
)
chrome
=
'none'
)
cls
.
accordionsection
=
ItemFactory
.
create
(
parent
=
cls
.
chapterchrome
,
self
.
accordionsection
=
ItemFactory
.
create
(
parent
=
self
.
chapterchrome
,
display_name
=
'accordion'
,
display_name
=
'accordion'
,
chrome
=
'accordion'
)
chrome
=
'accordion'
)
cls
.
tabssection
=
ItemFactory
.
create
(
parent
=
cls
.
chapterchrome
,
self
.
tabssection
=
ItemFactory
.
create
(
parent
=
self
.
chapterchrome
,
display_name
=
'tabs'
,
display_name
=
'tabs'
,
chrome
=
'tabs'
)
chrome
=
'tabs'
)
cls
.
defaultchromesection
=
ItemFactory
.
create
(
self
.
defaultchromesection
=
ItemFactory
.
create
(
parent
=
cls
.
chapterchrome
,
parent
=
self
.
chapterchrome
,
display_name
=
'defaultchrome'
,
display_name
=
'defaultchrome'
,
)
)
cls
.
fullchromesection
=
ItemFactory
.
create
(
parent
=
cls
.
chapterchrome
,
self
.
fullchromesection
=
ItemFactory
.
create
(
parent
=
self
.
chapterchrome
,
display_name
=
'fullchrome'
,
display_name
=
'fullchrome'
,
chrome
=
'accordion,tabs'
)
chrome
=
'accordion,tabs'
)
cls
.
tabtest
=
ItemFactory
.
create
(
parent
=
cls
.
chapterchrome
,
self
.
tabtest
=
ItemFactory
.
create
(
parent
=
self
.
chapterchrome
,
display_name
=
'progress_tab'
,
display_name
=
'progress_tab'
,
default_tab
=
'progress'
)
default_tab
=
'progress'
)
def
setUp
(
self
):
super
(
TestNavigation
,
self
)
.
setUp
()
# Create student accounts and activate them.
# Create student accounts and activate them.
for
i
in
range
(
len
(
self
.
STUDENT_INFO
)):
for
i
in
range
(
len
(
self
.
STUDENT_INFO
)):
email
,
password
=
self
.
STUDENT_INFO
[
i
]
email
,
password
=
self
.
STUDENT_INFO
[
i
]
...
...
openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py
View file @
6a6ef0fd
...
@@ -393,7 +393,7 @@ class TestMasqueradedGroup(StaffMasqueradeTestCase):
...
@@ -393,7 +393,7 @@ class TestMasqueradedGroup(StaffMasqueradeTestCase):
group.
group.
"""
"""
self
.
course
.
cohort_config
=
{
'cohorted'
:
True
}
self
.
course
.
cohort_config
=
{
'cohorted'
:
True
}
self
.
update_course
(
self
.
course
,
self
.
test_user
.
id
)
modulestore
()
.
update_item
(
self
.
course
,
self
.
test_user
.
id
)
cohort
=
CohortFactory
.
create
(
course_id
=
self
.
course
.
id
,
users
=
[
self
.
test_user
])
cohort
=
CohortFactory
.
create
(
course_id
=
self
.
course
.
id
,
users
=
[
self
.
test_user
])
CourseUserGroupPartitionGroup
(
CourseUserGroupPartitionGroup
(
course_user_group
=
cohort
,
course_user_group
=
cohort
,
...
...
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