Fix returning lazily-localized strings in hosting service exceptions.

Review Request #9792 — Created March 15, 2018 and submitted

Christian Hammond
Review Board

We had several places in the hosting service code where we served up
lazily-localized strings using ugettext_lazy(). While this will
normally get turned into a string at some point, it's not correct, and
caused issues in unit tests when assertion messages were added.

This adds unit tests to check messages along with assertion types, and
updates the hosting services to use ugettext() for exception messages.

Unit tests pass.

Christian Hammond
David Trowbridge
  1. Ship It!
Christian Hammond
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (8eacb0c)