- Summary:
-
[WIP] Added sandboxing to CommentDetailDisplayHookAdded sandboxing to CommentDetailDisplayHook
- Description:
-
Added sandboxing to CommentDetailDisplayHook
+ + Added unit tests to test suite at reviewboard/extensions/tests.py
- Testing Done:
-
+ Unit testing - tested both render_review_comment_detail and render_email_comment_detail with and without sandboxing
Added sandboxing to CommentDetailDisplayHook
Review Request #5709 — Created April 13, 2014 and submitted
Added sandboxing to CommentDetailDisplayHook
Added unit tests to test suite at reviewboard/extensions/tests.py
Unit testing - tested both render_review_comment_detail and render_email_comment_detail with and without sandboxing
Description | From | Last Updated |
---|---|---|
Please replace the space at the end of this line with a period (so it says "CommentDetailDisplayHook.render_review_comment_detail") |
david | |
Same comment here with space vs. period |
david | |
This is duplicated twice. I'd suggest getting rid of your new try calls, and just replacing the except NotImplementedError belowe … |
david | |
Because of the way that hooks attach themselves to their extension (and the fact that you don't use the hook … |
david | |
Because of the way that hooks attach themselves to their extension (and the fact that you don't use the hook … |
david | |
I'd like to make a few changes to this string. First, there are a lot of colons, which interrupt the … |
david | |
You still need to add a space after "with". Otherwise the string will concatenate to be "Error when running CommentDetailDisplayHook … |
david |
-
The code looks good, but the patch no longer applies cleanly. Can you rebase this onto the latest release-2.0.x and update?
-
-
This is duplicated twice. I'd suggest getting rid of your new try calls, and just replacing the
except NotImplementedError
belowe with this more-generic implementation. -
Because of the way that hooks attach themselves to their extension (and the fact that you don't use the
hook
variable anywhere), you can remove the variable assignment and just have this line beCommentDetailDisplayTestHook(extension=self.extension)
.This will make static checkers like pyflakes happier.
-
Because of the way that hooks attach themselves to their extension (and the fact that you don't use the
hook
variable anywhere), you can remove the variable assignment and just have this line beCommentDetailDisplayTestHook(extension=self.extension)
.This will make static checkers like pyflakes happier.
-
-
I'd like to make a few changes to this string. First, there are a lot of colons, which interrupt the readability of the sentence. Second, the first line has to end with a space so it won't concatenate to "withrender". Last, I'd like you to rewrap it to keep the strings as compact as possible.
logging.error('Error when running CommentDetailDisplayHook with ' 'render mode "%s" in extension %s: %s', render_mode, extension.metadata['Name'], e, exc_info=1)