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

Sea Turtles - Nina G. (Waves 3-6) #31

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

Conversation

anacapamu
Copy link

No description provided.

Copy link

@tgoslee tgoslee left a comment

Choose a reason for hiding this comment

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

Great job Nina!

@@ -1,7 +1,32 @@
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
Copy link

Choose a reason for hiding this comment

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

👍🏽

description = db.Column(db.String, nullable=False)
has_moon = db.Column(db.Boolean, nullable=False, default=False)

def to_dict(self):
Copy link

Choose a reason for hiding this comment

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

Nice helper methods and use of a classmethod!


def error_message(message, status_code):
Copy link

Choose a reason for hiding this comment

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

you could move your helper functions to a file helper_functions.py to clean up your routes file

def error_message(message, status_code):
abort(make_response(jsonify(dict(details=message)), status_code))

def validate_planet(planet_id):
Copy link

Choose a reason for hiding this comment

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

functions look good!

@@ -0,0 +1,63 @@
def test_get_planets_with_no_records(client):
Copy link

Choose a reason for hiding this comment

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

test routes look good!

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.

2 participants