-
Notifications
You must be signed in to change notification settings - Fork 61
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
base: main
Are you sure you want to change the base?
Conversation
…ssfully install all packages
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.
Great job Nina!
@@ -1,7 +1,32 @@ | |||
from flask import Flask | |||
from flask_sqlalchemy import SQLAlchemy |
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.
👍🏽
description = db.Column(db.String, nullable=False) | ||
has_moon = db.Column(db.Boolean, nullable=False, default=False) | ||
|
||
def to_dict(self): |
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.
Nice helper methods and use of a classmethod!
|
||
def error_message(message, status_code): |
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.
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): |
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.
functions look good!
@@ -0,0 +1,63 @@ | |||
def test_get_planets_with_no_records(client): |
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.
test routes look good!
No description provided.