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
0612b0eb
Commit
0612b0eb
authored
12 years ago
by
Carlos Andrés Rocha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests to advertised_start for partially parsable dates
parent
586f566b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
common/lib/xmodule/xmodule/tests/test_course_module.py
+7
-6
No files found.
common/lib/xmodule/xmodule/tests/test_course_module.py
View file @
0612b0eb
...
@@ -89,18 +89,19 @@ class IsNewCourseTestCase(unittest.TestCase):
...
@@ -89,18 +89,19 @@ class IsNewCourseTestCase(unittest.TestCase):
((
day2
,
None
,
None
),
(
day1
,
None
,
None
),
self
.
assertLess
),
((
day2
,
None
,
None
),
(
day1
,
None
,
None
),
self
.
assertLess
),
((
day1
,
None
,
None
),
(
day1
,
None
,
None
),
self
.
assertEqual
),
((
day1
,
None
,
None
),
(
day1
,
None
,
None
),
self
.
assertEqual
),
# Non-parseable advertised starts are ignored in preference
# Non-parseable advertised starts are ignored in preference to actual starts
# to actual starts
((
day2
,
None
,
"Spring"
),
(
day1
,
None
,
"Fall"
),
self
.
assertLess
),
((
day2
,
None
,
"Spring 2013"
),
(
day1
,
None
,
"Fall 2012"
),
self
.
assertLess
),
((
day1
,
None
,
"Spring"
),
(
day1
,
None
,
"Fall"
),
self
.
assertEqual
),
((
day1
,
None
,
"Spring 2013"
),
(
day1
,
None
,
"Fall 2012"
),
self
.
assertEqual
),
# Partially parsable advertised starts should take priority over start dates
((
day2
,
None
,
"October 2013"
),
(
day2
,
None
,
"October 2012"
),
self
.
assertLess
),
((
day2
,
None
,
"October 2013"
),
(
day1
,
None
,
"October 2013"
),
self
.
assertEqual
),
# Parseable advertised starts take priority over start dates
# Parseable advertised starts take priority over start dates
((
day1
,
None
,
day2
),
(
day1
,
None
,
day1
),
self
.
assertLess
),
((
day1
,
None
,
day2
),
(
day1
,
None
,
day1
),
self
.
assertLess
),
((
day2
,
None
,
day2
),
(
day1
,
None
,
day2
),
self
.
assertEqual
),
((
day2
,
None
,
day2
),
(
day1
,
None
,
day2
),
self
.
assertEqual
),
]
]
data
=
[]
for
a
,
b
,
assertion
in
dates
:
for
a
,
b
,
assertion
in
dates
:
a_score
=
self
.
get_dummy_course
(
start
=
a
[
0
],
announcement
=
a
[
1
],
advertised_start
=
a
[
2
])
.
sorting_score
a_score
=
self
.
get_dummy_course
(
start
=
a
[
0
],
announcement
=
a
[
1
],
advertised_start
=
a
[
2
])
.
sorting_score
b_score
=
self
.
get_dummy_course
(
start
=
b
[
0
],
announcement
=
b
[
1
],
advertised_start
=
b
[
2
])
.
sorting_score
b_score
=
self
.
get_dummy_course
(
start
=
b
[
0
],
announcement
=
b
[
1
],
advertised_start
=
b
[
2
])
.
sorting_score
...
...
This diff is collapsed.
Click to expand it.
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