Convert the e-mail preview views to class-based views.

Review Request #9005 — Created June 8, 2017 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
954f893...

Reviewers

The e-mail preview views perform the same checks that the other review
requests perform, so it's a good opportunity to use the new
ReviewRequestViewMixin. This change converts the e-mail preview views to
use this. It also introduces a handy base class, BasePreviewEmailView,
that wraps the decorator and makes it easy to construct a class-based
view around it.

Potentially we may choose to convert the decorator entirely to the
class-based view, since it's now only being used for this purpose, but
this change keeps the decorator around.

Unit tests have been added for the new base view, and existing tests for
the e-mail previews continue to work.

Manually tested each view.

Unit tests pass.