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
OpenEdx
edx-platform
Commits
c3667202
Commit
c3667202
authored
Nov 16, 2017
by
Dillon Dumesnil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test invalid inputs
parent
03118497
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
openedx/tests/xblock_integration/test_review_xblock.py
+44
-0
No files found.
openedx/tests/xblock_integration/test_review_xblock.py
View file @
c3667202
...
@@ -233,6 +233,50 @@ class TestReviewFunctions(TestReviewXBlock):
...
@@ -233,6 +233,50 @@ class TestReviewFunctions(TestReviewXBlock):
expected_h2
=
'Nothing to review'
expected_h2
=
'Nothing to review'
self
.
assertIn
(
expected_h2
,
response
.
content
)
self
.
assertIn
(
expected_h2
,
response
.
content
)
# @ddt.data(-1, 0, 1)
# def test_invalid_num_desired_inputs(self, num_desired):
# """
# Verifying that invalid inputs are rejected when trying to create the
# Review XBlock
# """
# self.enroll_student(self.STUDENTS[0]['email'], self.STUDENTS[0]['password'], self.course_actual)
# self.enroll_student(self.STUDENTS[0]['email'], self.STUDENTS[0]['password'], self.course_review)
# with self.store.bulk_operations(self.course_actual.id, emit_signals=False):
# review_section_actual = ItemFactory.create(
# parent=self.chapter_actual, display_name='Review Subsection'
# )
# review_unit_actual = ItemFactory.create(
# parent=review_section_actual, display_name='Review Unit'
# )
# review_xblock_actual = ItemFactory.create(
# parent=review_unit_actual,
# category='review',
# display_name='Review Tool',
# num_desired=num_desired
# )
# print
# print review_xblock_actual
# print
# user = User.objects.get(email=self.STUDENTS[0]['email'])
# crum.set_current_user(user)
# result_urls = get_review_ids.get_problems(num_desired, self.course_actual.id)
# print result_urls
# # Loading the review section
# response = self.client.get(reverse(
# 'courseware_section',
# kwargs={
# 'course_id': self.course_actual.id,
# 'chapter': self.chapter_actual.location.name,
# 'section': self.review_section_actual.location.name,
# }
# ))
# # print response
# assertEqual('a', 'b')
@ddt.data
(
5
,
7
)
@ddt.data
(
5
,
7
)
def
test_too_few_review_problems
(
self
,
num_desired
):
def
test_too_few_review_problems
(
self
,
num_desired
):
"""
"""
...
...
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