-
Notifications
You must be signed in to change notification settings - Fork 22
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
Simplify required fields #31
Conversation
Closes #22
content_url = models.URLField() | ||
thumbnail_url = models.URLField() | ||
description = models.CharField(max_length=300, blank=True) | ||
content_url = models.URLField(blank=True) |
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.
Are we sure about this one? Are people supposed to be able to post entries without a URL to point to the thing the entry was supposed to be for?
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're right, I goofed. Fixed now.
I want to see what happens when I dismiss a review
@@ -19,7 +19,7 @@ def test_post_minimum_entry(self): | |||
""" | |||
Test posting an entry with minimum amount of content | |||
""" | |||
payload = self.generatePostPayload(data={'title':'title test_post_minimum_entry'}) | |||
payload = self.generatePostPayload(data={'title':'title test_post_minimum_entry', 'tags':''}) |
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 probably also want to make sure we have full test coverage for required fields now.
def test_post_empty_title(self): |
content_url
also being required, we want to make sure that's a 400 as well?
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.
Added.
@@ -36,23 +36,18 @@ def test_post_duplicate_title(self): | |||
self.assertEqual(len(entriesJson), 4) | |||
|
|||
def test_post_empty_title(self): | |||
"""Make sure entries require a title""" | |||
"""Make sure entries require a title and content_url""" |
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.
can we split this up into two tests?
Closes #22
How are migrations handled when a server is already live? Do I need to just
makemigration
starting from a database that's identical to the one that's on the server and then commit the migration files?