Centralize webapi tests' mimetypes and URL lookups.
Review Request #4522 — Created Sept. 2, 2013 and submitted
Centralize webapi tests' mimetypes and URL lookups.
The work to split up the webapi test suite had an issue where unit test
classes were being executed multiple times in a test suite run. This
happened because test*.py files were importing classes from other
test*.py files, and nose was finding them. These needed to be imported
in order to get the mimetypes and URLs from those test classes.This change solves this problem by introducing webapi/tests/mimetypes.py
and webapi/tests/urls.py. mimetypes.py contains the full list of all
expected mimetypes found throughout the test suite. urls.py contains
functions for fetching all the URLs for all resources.As an aid to urls.py, WebAPIResource now includes functions for
computing the URLs. The ones in urls.py just wrap them to make the
lookups more convenient for the purpose of tests.
Unit tests pass.
Description | From | Last Updated |
---|---|---|
If you put the ( on the first line, you can skip the \ |
david | |
Same here. |
david | |
Can you put two lines in between each group? |
david | |
Same comment with ( and \ |
david | |
Col: 51 E127 continuation line over-indented for visual indent |
reviewbot | |
And here. |
david | |
And here. |
david | |
And here |
david | |
This doesn't need () |
david | |
Move the ( |
david | |
No () |
david | |
Move the ( |
david | |
Move ( |
david | |
Move ( |
david | |
Move ( |
david |
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/webapi/tests/test_review_reply_screenshot_comment.py
reviewboard/webapi/tests/test_review_screenshot_comment.py
reviewboard/webapi/tests/test_file_diff_comment.py
reviewboard/webapi/tests/test_watched_review_request.py
reviewboard/webapi/tests/test_review.py
reviewboard/webapi/tests/test_default_reviewer.py
reviewboard/webapi/tests/test_draft_review_screenshot_comment.py
reviewboard/webapi/tests/test_screenshot.py
reviewboard/webapi/tests/test_repository_commits.py
reviewboard/webapi/tests/test_review_comment.py
reviewboard/webapi/tests/test_review_group.py
reviewboard/webapi/tests/test_file_attachment_draft.py
reviewboard/webapi/tests/test_change.py
reviewboard/webapi/tests/test_review_reply.py
reviewboard/webapi/tests/test_file_attachment_comment.py
reviewboard/webapi/tests/urls.py
reviewboard/webapi/tests/test_server_info.py
reviewboard/webapi/tests/test_repository_branches.py
reviewboard/webapi/tests/test_user.py
reviewboard/webapi/tests/base.py
reviewboard/webapi/tests/test_review_reply_file_attachment_comment.py
reviewboard/webapi/tests/test_screenshot_comment.py
reviewboard/webapi/tests/test_session.py
reviewboard/webapi/tests/test_watched_review_group.py
reviewboard/webapi/tests/test_review_request.py
reviewboard/webapi/tests/test_review_request_draft.py
reviewboard/webapi/tests/test_draft_review_file_attachment_comment.py
reviewboard/webapi/base.py
reviewboard/webapi/resources.py
reviewboard/webapi/tests/test_diff.py
reviewboard/webapi/tests/test_repository.py
reviewboard/webapi/tests/test_validate_diff.py
reviewboard/webapi/tests/test_root.py
reviewboard/webapi/tests/test_file_attachment.py
reviewboard/webapi/tests/mimetypes.py
reviewboard/webapi/tests/test_review_group_user.py
reviewboard/webapi/tests/test_repository_info.py
reviewboard/webapi/tests/test_review_reply_diff_comment.py
reviewboard/webapi/tests/test_screenshot_draft.py
Ignored Files:
- Change Summary:
-
Fixes requested during review.
- Diff:
-
Revision 2 (+1501 -1231)
-
This is a review from Review Bot.
Tool: PEP8 Style Checker
Processed Files:
reviewboard/webapi/tests/test_review_reply_screenshot_comment.py
reviewboard/webapi/tests/test_review_screenshot_comment.py
reviewboard/webapi/tests/test_file_diff_comment.py
reviewboard/webapi/tests/test_watched_review_request.py
reviewboard/webapi/tests/test_review.py
reviewboard/webapi/tests/test_default_reviewer.py
reviewboard/webapi/tests/test_draft_review_screenshot_comment.py
reviewboard/webapi/tests/test_screenshot.py
reviewboard/webapi/tests/test_repository_commits.py
reviewboard/webapi/tests/test_review_comment.py
reviewboard/webapi/tests/test_review_group.py
reviewboard/webapi/tests/test_file_attachment_draft.py
reviewboard/webapi/tests/test_change.py
reviewboard/webapi/tests/test_review_reply.py
reviewboard/webapi/tests/test_file_attachment_comment.py
reviewboard/webapi/tests/urls.py
reviewboard/webapi/tests/test_server_info.py
reviewboard/webapi/tests/test_repository_branches.py
reviewboard/webapi/tests/test_user.py
reviewboard/webapi/tests/base.py
reviewboard/webapi/tests/test_review_reply_file_attachment_comment.py
reviewboard/webapi/tests/test_screenshot_comment.py
reviewboard/webapi/tests/test_session.py
reviewboard/webapi/tests/test_watched_review_group.py
reviewboard/webapi/tests/test_review_request.py
reviewboard/webapi/tests/test_review_request_draft.py
reviewboard/webapi/tests/test_draft_review_file_attachment_comment.py
reviewboard/webapi/base.py
reviewboard/webapi/resources.py
reviewboard/webapi/tests/test_diff.py
reviewboard/webapi/tests/test_repository.py
reviewboard/webapi/tests/test_validate_diff.py
reviewboard/webapi/tests/test_root.py
reviewboard/webapi/tests/test_file_attachment.py
reviewboard/webapi/tests/mimetypes.py
reviewboard/webapi/tests/test_review_group_user.py
reviewboard/webapi/tests/test_repository_info.py
reviewboard/webapi/tests/test_review_reply_diff_comment.py
reviewboard/webapi/tests/test_screenshot_draft.py
Ignored Files:
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/webapi/tests/test_review_reply_screenshot_comment.py
reviewboard/webapi/tests/test_review_screenshot_comment.py
reviewboard/webapi/tests/test_file_diff_comment.py
reviewboard/webapi/tests/test_watched_review_request.py
reviewboard/webapi/tests/test_review.py
reviewboard/webapi/tests/test_default_reviewer.py
reviewboard/webapi/tests/test_draft_review_screenshot_comment.py
reviewboard/webapi/tests/test_screenshot.py
reviewboard/webapi/tests/test_repository_commits.py
reviewboard/webapi/tests/test_review_comment.py
reviewboard/webapi/tests/test_review_group.py
reviewboard/webapi/tests/test_file_attachment_draft.py
reviewboard/webapi/tests/test_change.py
reviewboard/webapi/tests/test_review_reply.py
reviewboard/webapi/tests/test_file_attachment_comment.py
reviewboard/webapi/tests/urls.py
reviewboard/webapi/tests/test_server_info.py
reviewboard/webapi/tests/test_repository_branches.py
reviewboard/webapi/tests/test_user.py
reviewboard/webapi/tests/base.py
reviewboard/webapi/tests/test_review_reply_file_attachment_comment.py
reviewboard/webapi/tests/test_screenshot_comment.py
reviewboard/webapi/tests/test_session.py
reviewboard/webapi/tests/test_watched_review_group.py
reviewboard/webapi/tests/test_review_request.py
reviewboard/webapi/tests/test_review_request_draft.py
reviewboard/webapi/tests/test_draft_review_file_attachment_comment.py
reviewboard/webapi/base.py
reviewboard/webapi/resources.py
reviewboard/webapi/tests/test_diff.py
reviewboard/webapi/tests/test_repository.py
reviewboard/webapi/tests/test_validate_diff.py
reviewboard/webapi/tests/test_root.py
reviewboard/webapi/tests/test_file_attachment.py
reviewboard/webapi/tests/mimetypes.py
reviewboard/webapi/tests/test_review_group_user.py
reviewboard/webapi/tests/test_repository_info.py
reviewboard/webapi/tests/test_review_reply_diff_comment.py
reviewboard/webapi/tests/test_screenshot_draft.py
Ignored Files: