-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bare offer #260
Merged
Merged
Bare offer #260
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This makes a request to the bare /offer/ url return a blank disclosure with no error messages. diff --git a/CHANGELOG.md b/CHANGELOG.md index 7033d3f..bcbd35a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ We follow the [Semantic Versioning 2.0.0](http://semver.org/) format. - Fix alignment issues in debt summary - Update our national statistics from scorecard project - Update national stats to deliver generic stats at /api/national-stats/ +- simplify warnings for ID problems ## 2.1.5 - Show recalculation updates on mobile screens diff --git a/paying_for_college/tests/test_views.py b/paying_for_college/tests/test_views.py index 7fbadf5..8119061 100644 --- a/paying_for_college/tests/test_views.py +++ b/paying_for_college/tests/test_views.py @@ -253,27 +253,27 @@ class OfferTest(django.test.TestCase): self.assertTrue(resp.status_code == 200) resp2 = client.get(url+no_oid) self.assertTrue(resp2.status_code == 200) - self.assertTrue("Warning" in resp2.context['warning']) + self.assertTrue("noOffer" in resp2.context['warning']) resp3 = client.get(url+bad_school) - self.assertTrue("Warning" in resp3.context['warning']) + self.assertTrue("noSchool" in resp3.context['warning']) self.assertTrue(resp3.status_code == 200) resp4 = client.get(url+bad_program) self.assertTrue(resp4.status_code == 200) - self.assertTrue("Warning" in resp4.context['warning']) + self.assertTrue("noProgram" in resp4.context['warning']) resp5 = client.get(url+missing_oid_field) self.assertTrue(resp5.status_code == 200) - self.assertTrue("Warning" in resp5.context['warning']) + self.assertTrue("noOffer" in resp5.context['warning']) resp6 = client.get(url+missing_school_id) - self.assertTrue("Warning" in resp6.context['warning']) + self.assertTrue("noSchool" in resp6.context['warning']) self.assertTrue(resp6.status_code == 200) resp7 = client.get(url+bad_oid) - self.assertTrue("Error" in resp7.context['warning']) + self.assertTrue("noOffer" in resp7.context['warning']) self.assertTrue(resp7.status_code == 200) resp8 = client.get(url+illegal_program) - self.assertTrue("Error" in resp8.context['warning']) + self.assertTrue("noProgram" in resp8.context['warning']) self.assertTrue(resp8.status_code == 200) resp9 = client.get(url+no_program) - self.assertTrue("Warning" in resp9.context['warning']) + self.assertTrue("noProgram" in resp9.context['warning']) self.assertTrue(resp9.status_code == 200) diff --git a/paying_for_college/views.py b/paying_for_college/views.py index 157aec6..98157e9 100755 --- a/paying_for_college/views.py +++ b/paying_for_college/views.py @@ -46,11 +46,9 @@ else: # pragma: no cover URL_ROOT = 'paying-for-college2' EXPENSE_FILE = '{}/fixtures/bls_data.json'.format(BASEDIR) -NO_SCHOOL_ERROR = "No active school could be found for iped ID {0}" -OID_WARNING = "Error: Illegal offer ID" -# only characters 0-9 and a-f are allowed in offer IDs -PID_WARNING = "Error: Illegal program code" -# program code isn't 40 chars or contains Illegal characters: ; < > { } +IPED_ERROR = "noSchool" +OID_ERROR = "noOffer" +PID_ERROR = "noProgram" def get_json_file(filename): Merge branch 'master' into bare-offer
👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This delivers a blank disclosure when a request goes to the bare
/offer/
URLChanges
Note
It appears that without an offer ID, you can't answer the final question.
Testing
Review
Checklist