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
Response refactor #39
Conversation
… error handling refactors
Taylor, this might be one where rebasing the docs branch would be most appropriate. I can try to rebase it on my local machine and let you know what happens. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good. I'll make some changes to my PR to be a little more compatible with this.
message_in_a_bottle/api/models.py
Outdated
else: | ||
return False | ||
|
||
# TODO: rename this function to be more specific to MapQuest Service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I can add that to my error handling branch/PR since it is already dealing with this function.
@@ -6,15 +6,15 @@ | |||
from message_in_a_bottle.api.serializers import StorySerializer | |||
|
|||
@pytest.mark.django_db | |||
class TestGetStory(TestCase): | |||
class TestStoryRequests(TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're probably gonna get some merge conflicts with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed - I would propose the error_handling
PR (I am assuming that is the one we should refer to, as it looks much more complete / less commented-out code?) should just include tests / changes for the GET
(index) endpoint and associated tests. I can back into new test structure from there from all other CRUD
I was working on this branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of intuitive changes! Glad to see that our coverage is still that high.
Changes Implemented:
PATCH /api/v1/stories/<int:pk>
PUT
fromCORS_ALLOWED_METHODS
insettings.py
(only doing partial updates from FE forname
,title
, andmessage
, and do not need aPUT
request to update all attributes)1.0 Spec
POST /api/v1/stories
endpoint, to ensure database is clear of stories with invalid coordinatesGET /stories?latitude=<lat>&longitude=<lon>
to use same function call and DRY up codeGET
request for a single story would produce a 404; already pre-wrote the env var forProd
, so this will all still pass post-merge)Circle
build commands to runpytest --cov
for that fancy schmancy coverage report that is so uber-satisfying to look atQuality Control Checklist:
99% yo!!!
Blockers (if applicable): None
Next Steps & Additional Notes:
GeoLoc
logic forindex
andshow
endpoints