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
44f4e7b1
Commit
44f4e7b1
authored
Aug 23, 2013
by
Giulio Gratta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refatoring tests and added to changelog
parent
4e770988
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
CHANGELOG.rst
+3
-0
lms/djangoapps/django_comment_client/tests/test_utils.py
+14
-11
No files found.
CHANGELOG.rst
View file @
44f4e7b1
...
...
@@ -5,6 +5,9 @@ These are notable changes in edx-platform. This is a rolling list of changes,
in roughly chronological order, most recent first. Add your entries at or near
the top. Include a label indicating the component affected.
LMS: Added alphabetical sorting of forum categories and subcategories.
It is hidden behind a false defaulted course level flag.
Studio: Allow course authors to set their course image on the schedule
and details page, with support for JPEG and PNG images.
...
...
lms/djangoapps/django_comment_client/tests/test_utils.py
View file @
44f4e7b1
...
...
@@ -2,7 +2,6 @@ from django.test import TestCase
from
student.tests.factories
import
UserFactory
,
CourseEnrollmentFactory
from
django_comment_common.models
import
Role
,
Permission
from
factories
import
RoleFactory
from
copy
import
deepcopy
import
django_comment_client.utils
as
utils
...
...
@@ -29,8 +28,10 @@ class DictionaryTestCase(TestCase):
expected
=
{
'cats'
:
'meow'
,
'dogs'
:
'woof'
,
'lions'
:
'roar'
,
'ducks'
:
'quack'
}
self
.
assertEqual
(
utils
.
merge_dict
(
d1
,
d2
),
expected
)
def
test_sort
(
self
):
d1
=
{
class
CategorySortTestCase
(
TestCase
):
def
setUp
(
self
):
self
.
category_map
=
{
'entries'
:
{
u'General'
:
{
'sort_key'
:
u'General'
...
...
@@ -64,8 +65,9 @@ class DictionaryTestCase(TestCase):
}
}
}
expected_1
=
{
def
test_alpha_sort_true
(
self
):
expected_true
=
{
'entries'
:
{
u'General'
:
{
'sort_key'
:
u'General'
...
...
@@ -103,7 +105,11 @@ class DictionaryTestCase(TestCase):
}
}
expected_2
=
{
utils
.
sort_map_entries
(
self
.
category_map
,
True
)
self
.
assertEqual
(
self
.
category_map
,
expected_true
)
def
test_alpha_sort_false
(
self
):
expected_false
=
{
'entries'
:
{
u'General'
:
{
'sort_key'
:
u'General'
...
...
@@ -141,11 +147,8 @@ class DictionaryTestCase(TestCase):
}
}
d2
=
deepcopy
(
d1
)
utils
.
sort_map_entries
(
d1
,
True
)
utils
.
sort_map_entries
(
d2
,
False
)
self
.
assertEqual
(
d1
,
expected_1
)
self
.
assertEqual
(
d2
,
expected_2
)
utils
.
sort_map_entries
(
self
.
category_map
,
False
)
self
.
assertEqual
(
self
.
category_map
,
expected_false
)
class
AccessUtilsTestCase
(
TestCase
):
...
...
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