cfpb / college-costs

⚠️ Deprecated: see note. ⚠️ A tool to help students weigh the costs and rewards of a college program.
https://www.consumerfinance.gov/paying-for-college2/understanding-your-financial-aid-offer/about-this-tool/
50 stars 27 forks source link

Fix test when using locale middleware #300

Closed willbarton closed 7 years ago

willbarton commented 7 years ago

When running the college-costs tests with https://github.com/cfpb/cfgov-refresh/, the django locale middleware is loaded. That middleware chokes trying to modify the headers of the original MagicMock it got instead of a Response object. This PR removes the mocking of render_to_response and mocks the feedback object creation instead.

Part of GHE/CFGOV/platform/issues/798

Changes

Testing

Checklist

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling cc151cf52ea41afe738f27388f579d6096dea8fd on holistic-tests into 0a2dda83381db676e2895f4227d8c06c00d0f6e2 on master.

higs4281 commented 7 years ago

Wouldn't #299 make a handsome pairing for a release? ??

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 8c27c4e5e4ce7ef8f6b873c7ed80d45662ace109 on holistic-tests into 0a2dda83381db676e2895f4227d8c06c00d0f6e2 on master.