-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use XBlock 0.3 #839
Merged
Merged
Use XBlock 0.3 #839
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from contentstore.tests.test_course_settings import CourseTestCase | ||
from contentstore.tests.utils import CourseTestCase | ||
from xmodule.modulestore.tests.factories import CourseFactory | ||
from django.core.urlresolvers import reverse | ||
from xmodule.capa_module import CapaDescriptor | ||
|
@@ -69,7 +69,7 @@ def test_create_nicely(self): | |
# get the new item and check its category and display_name | ||
chap_location = self.response_id(resp) | ||
new_obj = modulestore().get_item(chap_location) | ||
self.assertEqual(new_obj.category, 'chapter') | ||
self.assertEqual(new_obj.scope_ids.block_type, 'chapter') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need to figure out these new scope_ids. I'll hunt around xblock code for it. |
||
self.assertEqual(new_obj.display_name, display_name) | ||
self.assertEqual(new_obj.location.org, self.course.location.org) | ||
self.assertEqual(new_obj.location.course, self.course.location.course) | ||
|
@@ -226,7 +226,7 @@ def test_date_fields(self): | |
Test setting due & start dates on sequential | ||
""" | ||
sequential = modulestore().get_item(self.seq_location) | ||
self.assertIsNone(sequential.lms.due) | ||
self.assertIsNone(sequential.due) | ||
self.client.post( | ||
reverse('save_item'), | ||
json.dumps({ | ||
|
@@ -236,7 +236,7 @@ def test_date_fields(self): | |
content_type="application/json" | ||
) | ||
sequential = modulestore().get_item(self.seq_location) | ||
self.assertEqual(sequential.lms.due, datetime.datetime(2010, 11, 22, 4, 0, tzinfo=UTC)) | ||
self.assertEqual(sequential.due, datetime.datetime(2010, 11, 22, 4, 0, tzinfo=UTC)) | ||
self.client.post( | ||
reverse('save_item'), | ||
json.dumps({ | ||
|
@@ -246,5 +246,5 @@ def test_date_fields(self): | |
content_type="application/json" | ||
) | ||
sequential = modulestore().get_item(self.seq_location) | ||
self.assertEqual(sequential.lms.due, datetime.datetime(2010, 11, 22, 4, 0, tzinfo=UTC)) | ||
self.assertEqual(sequential.lms.start, datetime.datetime(2010, 9, 12, 14, 0, tzinfo=UTC)) | ||
self.assertEqual(sequential.due, datetime.datetime(2010, 11, 22, 4, 0, tzinfo=UTC)) | ||
self.assertEqual(sequential.start, datetime.datetime(2010, 9, 12, 14, 0, tzinfo=UTC)) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saw this in Don's PR - why does
_field_data
have a leading underscore when it's being used so much outside of its class? If nothing else, you're probably going to have to deal with a bunch of pylint violations for that...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned there: It's not intended for public consumption. Generally, external code should just be using the field attributes.