diff --git a/RELEASES.md b/RELEASES.md index e582d4f1..95c3e06f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -25,6 +25,7 @@ Release 1.5.0 on 2018-03-2? **Bug Fixes** - [#844](https://github.com/OpenSourcePolicyCenter/PolicyBrain/pull/842) - Pass start year to dynamic behavioral - Hank Doupe - [#851](https://github.com/OpenSourcePolicyCenter/PolicyBrain/pull/851) - Update update CSV builder test labels and un-xfail the CSV test - Hank Doupe +- [#865](https://github.com/OpenSourcePolicyCenter/PolicyBrain/pull/865) - Extend tests and fix warning/error handling regression - Hank Doupe Release 1.4.4 on 2018-03-08 ---------------------------- diff --git a/webapp/apps/taxbrain/tests/test_views.py b/webapp/apps/taxbrain/tests/test_views.py index 7ad8a00e..e5a61006 100644 --- a/webapp/apps/taxbrain/tests/test_views.py +++ b/webapp/apps/taxbrain/tests/test_views.py @@ -412,6 +412,7 @@ def test_taxbrain_warning_on_widow_param(self): assert response.status_code == 200 assert response.context['start_year'] == str(START_YEAR) assert response.context['data_source'] == 'PUF' + assert response.context['form'] is not None @pytest.mark.parametrize('data_source', ['PUF', 'CPS']) def test_taxbrain_wildcard_in_validation_params_gives_error(self, data_source): @@ -456,6 +457,7 @@ def test_taxbrain_improper_reverse_gives_error1(self): # Check that redirect happens assert response.status_code == 200 assert response.context['has_errors'] is True + assert response.context['form'] is not None def test_taxbrain_improper_reverse_gives_error2(self): """ @@ -472,6 +474,7 @@ def test_taxbrain_improper_reverse_gives_error2(self): # Check that redirect happens assert response.status_code == 200 assert response.context['has_errors'] is True + assert response.context['form'] is not None def test_taxbrain_bool_separated_values(self): """ diff --git a/webapp/apps/taxbrain/views.py b/webapp/apps/taxbrain/views.py index 7dd8cb31..e0284e3b 100644 --- a/webapp/apps/taxbrain/views.py +++ b/webapp/apps/taxbrain/views.py @@ -464,7 +464,7 @@ def personal_results(request): return redirect(obj) # Errors from taxcalc.tbi.reform_warnings_errors else: - personal_inputs = obj + personal_inputs = post_meta.personal_inputs start_year = post_meta.start_year data_source = post_meta.data_source if data_source == 'PUF':