Skip to content
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

in5piration-board - Sea Turtle Group 5 (Danielle, Gelly, Olive, Tiffini) #32

Open
wants to merge 49 commits into
base: main
Choose a base branch
from

Conversation

daniellewhyte
Copy link

No description provided.

daniellewhyte and others added 30 commits June 27, 2022 13:59
Copy link

@kelsey-steven-ada kelsey-steven-ada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice looking API folks! Let me know if you have any questions on the feedback =]

from app.models.board import Board
from .routes_helper import get_record_by_id, make_record_safely

card_bp = Blueprint('card_bp', __name__, url_prefix="/boards/")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity of naming, if the routes in this file are all prefixed with boards I might consider naming the file something like board_card_routes to help imply the nesting.

I would also consider, should all the routes be nested under /boards? The routes to delete and like a card don't require a board id, so it could make sense to simplify those routes to something like /cards/<card_id>.

@@ -0,0 +1,23 @@
from flask import jsonify, abort, make_response

def error_message(message, status_code):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ helper functions!

assert response.status_code == 200
assert len(Board.query.get(1).cards) == 2

def test_like_card(client, one_card):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice test suite! Some other considerations could be around what happens when you like a card that doesn't exist, or when you try to add a card to a board that doesn't exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants