Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
27eea34a
Commit
27eea34a
authored
Feb 02, 2018
by
Jeff LaJoie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test updates
parent
d27e9086
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
course_discovery/apps/publisher/tests/factories.py
+1
-0
course_discovery/apps/publisher/tests/test_views.py
+22
-0
No files found.
course_discovery/apps/publisher/tests/factories.py
View file @
27eea34a
...
@@ -27,6 +27,7 @@ class CourseFactory(factory.DjangoModelFactory):
...
@@ -27,6 +27,7 @@ class CourseFactory(factory.DjangoModelFactory):
learner_testimonial
=
FuzzyText
()
learner_testimonial
=
FuzzyText
()
level_type
=
factory
.
SubFactory
(
factories
.
LevelTypeFactory
)
level_type
=
factory
.
SubFactory
(
factories
.
LevelTypeFactory
)
image
=
factory
.
django
.
ImageField
()
image
=
factory
.
django
.
ImageField
()
version
=
FuzzyInteger
(
0
,
1
)
primary_subject
=
factory
.
SubFactory
(
factories
.
SubjectFactory
)
primary_subject
=
factory
.
SubFactory
(
factories
.
SubjectFactory
)
secondary_subject
=
factory
.
SubFactory
(
factories
.
SubjectFactory
)
secondary_subject
=
factory
.
SubFactory
(
factories
.
SubjectFactory
)
...
...
course_discovery/apps/publisher/tests/test_views.py
View file @
27eea34a
...
@@ -758,6 +758,28 @@ class CourseRunDetailTests(SiteMixin, TestCase):
...
@@ -758,6 +758,28 @@ class CourseRunDetailTests(SiteMixin, TestCase):
self
.
course_run
.
enrollment_end
]:
self
.
course_run
.
enrollment_end
]:
self
.
assertContains
(
response
,
value
.
strftime
(
self
.
date_format
))
self
.
assertContains
(
response
,
value
.
strftime
(
self
.
date_format
))
def
test_course_run_with_version
(
self
):
"""
Verify that a SEAT_VERSION course still shows enrollment
track data, and an ENTITLEMENT_VERSION course does not
"""
self
.
client
.
logout
()
self
.
client
.
login
(
username
=
self
.
user
.
username
,
password
=
USER_PASSWORD
)
# For SEAT_VERSION Enrollment Track should be shown
self
.
course
.
version
=
Course
.
SEAT_VERSION
self
.
course
.
save
()
response
=
self
.
client
.
get
(
self
.
page_url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
'Enrollment Track'
)
# For ENTITLEMENT_VERSION no Enrollment Track should be show
self
.
course
.
version
=
Course
.
ENTITLEMENT_VERSION
self
.
course
.
save
()
response
=
self
.
client
.
get
(
self
.
page_url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertContains
(
response
,
'Enrollment Track'
)
def
test_detail_page_with_comments
(
self
):
def
test_detail_page_with_comments
(
self
):
""" Verify that detail page contains all the data along with comments
""" Verify that detail page contains all the data along with comments
for course.
for course.
...
...
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