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
3fd69bca
Commit
3fd69bca
authored
Jan 23, 2013
by
Deena Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more tests in test_views.py
parent
7884e2c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
lms/djangoapps/courseware/tests/test_views.py
+7
-2
No files found.
lms/djangoapps/courseware/tests/test_views.py
View file @
3fd69bca
...
...
@@ -11,7 +11,8 @@ from django.contrib.auth.models import User
from
student.models
import
CourseEnrollment
import
courseware.views
as
views
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.exceptions
import
InvalidLocationError
,
\
ItemNotFoundError
,
NoPathToItem
class
Stub
():
pass
...
...
@@ -25,6 +26,7 @@ class ViewsTestCase(TestCase):
self
.
enrollment
=
CourseEnrollment
.
objects
.
get_or_create
(
user
=
self
.
user
,
course_id
=
self
.
course_id
,
created
=
self
.
date
)[
0
]
self
.
location
=
[
'tag'
,
'org'
,
'course'
,
'category'
,
'name'
]
def
test_user_groups
(
self
):
# depreciated function?
...
...
@@ -75,5 +77,8 @@ class ViewsTestCase(TestCase):
self
.
assertTrue
(
views
.
registered_for_course
(
mock_course
,
self
.
user
))
def
test_jump_to
(
self
):
self
.
assertRaises
(
Http404
,
views
.
jump_to
,
'foo'
,
'bar'
,
())
mock_request
=
MagicMock
()
self
.
assertRaises
(
Http404
,
views
.
jump_to
,
mock_request
,
'bar'
,
())
self
.
assertRaises
(
ItemNotFoundError
,
views
.
jump_to
,
mock_request
,
'dummy'
,
self
.
location
)
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