Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: test only accepts int values in priority #12

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cms/djangoapps/contentstore/views/tests/test_tabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ def test_delete(self):
tabs.primitive_delete(course, 6)

assert course.tabs[1] != {'type': 'dates', 'name': 'Dates'}
tabs.primitive_delete(course, 1)
tabs.primitive_delete(course, len(course.tabs) - 2)
assert {'type': 'progress'} not in course.tabs
# Check that dates has shifted up
assert course.tabs[1] == {'type': 'dates', 'name': 'Dates'}
assert course.tabs[-1] == {'type': 'dates', 'name': 'Dates'}

def test_insert(self):
"""Test primitive tab insertion."""
Expand Down
3 changes: 3 additions & 0 deletions lms/djangoapps/courseware/tabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class SyllabusTab(EnrolledTab):
"""
type = 'syllabus'
title = gettext_noop('Syllabus')
priority = 980
view_name = 'syllabus'
allow_multiple = True
is_default = False
Expand All @@ -78,6 +79,7 @@ class ProgressTab(EnrolledTab):
"""
type = 'progress'
title = gettext_noop('Progress')
priority = 990
view_name = 'progress'
is_hideable = True
is_default = False
Expand Down Expand Up @@ -303,6 +305,7 @@ class DatesTab(EnrolledTab):
type = "dates"
# We don't have the user in this context, so we don't want to translate it at this level.
title = gettext_noop("Dates")
priority = 1000
view_name = "dates"

def __init__(self, tab_dict):
Expand Down
Loading